Getting ready

This recipe uses the RGB LED kit used in the previous recipe; you will also need the following additional items:

  • Breadboard (half-sized or larger)
  • 2 x DuPont female-to-male patch wires
  • Tilt switch (the ball-bearing type is suitable)
  • 1 x 470 ohm resistor (R_Protect)
  • Breadboard wire (solid core)

The tilt switch should be added to the RGB LED (as described in the Getting ready section of the Multiplexed color LEDs recipe). The tilt switch is wired as follows:

The tilt switch is connected to GPIO Input (GPIO pin 24) and Gnd (GPIO pin 6)

To reproduce the POV image, you will need to be able to quickly move the LEDs and tilt the switch back and forth. Note how the tilt switch is mounted angled to the side, so the switch will open when moved to the left. It is recommended that the hardware is mounted onto a length of wood or similar piece of equipment. You can even use a portable USB battery pack along with a Wi-Fi dongle to power and control the Raspberry Pi through a remote connection (see the Connecting Remotely to the Raspberry Pi over the Network using SSH (and X11 forwarding) recipe in Chapter 1, Getting Started with a Raspberry Pi 3 Computer, for details):

Persistence of vision hardware setup

You will also need the completed rgbled.py file, which we will extend further in the How to do it... section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.130.13