RPi – Hello, Pi!

In this episode of Cooking with Team 279, we’ll explore the “Hello, World!” of embedded computers… controlling an LED. This exercise focuses on doing, without a lot of theory, to get exposure to how to hook a circuit up to a Raspberry Pi, and write a basic Python script to interract with it.

The worksheet will guide the user through using a breadboard to build a circuit with a LED and push button to:

  1. Use a GPIO pin to turn the LED on and off
  2. Use the push button to start and stop the LED blinking

Subsequent episodes will discuss circuit safety, and dive into more details about what is being done and why.



(edited 8/20/2016 – code files, and updated worksheet to fix bugs, and make code more readable)


· Become familiar with the basics of how the Raspberry Pi can control hardware
· Learn how to create a simple Python script
· Learn how to turn an LED on and off
· Learn how to accept input from a push button
· Learn the layout of a breadboard
· Raspberry Pi
· Breadboard
· 3mm or 5mm Red LED
· 470Ω Resistor
· 1kΩ Resistor
· Momentary Push Button (suitable for bread board)
· Jumper Wires