- Raspberry Pi
- BreadBoard or T-Cobbler
- Jumper Wires
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Setup
Connect led and Pushbutton as per Video or Photo and write the code and change it according to your connection on breadboard.
Step 2: Install Libraries for GPIO
$ sudo apt-get update
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio
Step 3: Python Program
import RPi.GPIO as GPIO
print "LED on"
print "LED off"
Step 4: Understand Program Lines
Read this all code line instruction for better understanding