Introduction: Control Led by Pushbutton | Raspberry Pi 3 | Tutorial - 2
- Raspberry Pi
- BreadBoard or T-Cobbler
- Jumper Wires
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
We have a be nice policy.
Please be positive and constructive.