Chapter 6. Blinky Pi
- Giving your Pi the ability to talk to the outside world through connectors to anything
- Programming the world outside your Pi with simple electric/electronic circuits
- Programming the connectors using your previous Python knowledge to make light patterns
Setting robots in motion, creating smart homes with sensors, and designing an interactive electronic art exhibit sound like vastly different topics, but they’re all things you can do with your Raspberry Pi. In each case, the Pi can act as the brain and interact with the world by doing things like
- Checking a robot’s sensors and controlling its motors
- Sensing a room’s occupants and adjusting the thermostat or lights
- Controlling sound, motion, and light as part of an art display
In this chapter, you’ll set up your Pi to control small light bulbs called light-emitting diodes (LEDs). You’ll make the LEDs blink using Python. To do this, you’ll need to learn a bit about how to build electrical circuits on breadboards. If you’ve never heard of a breadboard, don’t worry! It’s a small board with lots of holes in it to make it easier to build electrical circuits. You’ll also be using short wires (called jumper wires) to connect certain holes. You’ll even learn how to add resistors that keep your LEDs from burning out. See figure 6.1 for a list of parts and what they look like; gather the parts, and let’s get started!