Part 3. Pi and Python projects

Let’s face it. Pressing buttons, playing sounds, and lighting up cool colored lights is fun! Now you get to use your Pi to make those things happen. You’re going to create interactive projects that use your Pi’s input and output pins. This makes your Pi a special type of computer that doesn’t just show images on the screen, but that can control and sense the world around it. This realm is called physical computing. Robotics is physical computing, but think about all the creative possibilities such as making interactive art, creating smart rooms that sense your presence and turn on a light or play music, or producing something that can alert you if it’s about to start raining or your pet is drinking water.

In part 3, you’ll build projects that can interact with the world using Python and your Raspberry Pi. The projects will require some additional parts that you can purchase individually or as part of a kit, such as the CanaKit Ultimate Kit, Adafruit Starter Kit, or MCM Electronics Starter Kit:

  • Raspberry Pi 2 Model B including SD card, power supply, cables, keyboard, and monitor
  • Breadboard
  • GPIO ribbon cable for the Model B+ (40 pin)
  • GPIO breakout board
  • 1 dozen jumper wires, male to male
  • 1 red LED (light-emitting diode)
  • 1 green LED
  • 1 blue LED
  • 3 push buttons
  • 3 resistors, 10K ohm
  • 3 resistors, 180 ohm (or between 100 and 300 ohms)
  • Headphones or powered computer speakers

You start in chapter 6 by setting up your Pi with an electronics breadboard, building a simple circuit, and controlling an LED (light) using Python. You’ll learn how to communicate through your Pi’s output pins to make something happen. In this case, you’ll make an LED light up. Chapter 7 dives into creating an interactive guessing game that uses lights to respond to a player’s input, letting them know with different colors whether their answer is right or wrong. In chapter 8, you’ll learn how to listen to your Pi’s input pins by wiring up a push button on your breadboard and then responding when it’s pushed; and you’ll complete a project that combines buttons and sounds to make your own DJ Raspi sound mixer. By the end, the goal is for you to have the knowledge, skills, and confidence to think up and create your own Pi and Python projects.

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

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