Single bulb flashing with Pi:
Bulb will be flashed for every 2 seconds after running the following code.
Traffic lights demonstration using Pi:
The lights in the following circuit is lights are controlled by the program.
On input “R”-> Red light glows
On input “Y”-> Yellow light glows
On input “G”-> Green light glows
Flashing LED on button press:
On pressing the button light will be flashing infinatle
Multiple light blink on a button press:
On pressing the button program will make lights to glow in the sequence given like traffic signals.
- Red light for 2 seconds
- Flashing yellow thrice
- Green light for another 2 seconds and the loop continues in this way.
import RPi.GPIO as GPIO
- Aneesh had a doubt regarding his circuit. So, I tried to help him out. There is a problem in assumption regarding pushbutton internal circuit.
- Lavanya had a doubt regarding program and circuit. She was unable to catch button press in the right loop.
Past class work on button input for arduino.