Python: Raspberry Pi: Adding Button to control LED blinking

Second Project

This is an extension of the first project where letting the python to control the LED blinking. Instead of that, I am going to a physical button to control the LED blinking instead.

Requirements are, when button not pressed, the LED blinks and when the button pressed, the LED lid continuously.

This project is slightly trickier as more wires involved but not terribly bad. Just be cautious of where the wires go.

I am rewiring everything from the first project as I need to cram the LED and the button in the tiny breadboard.

My new pin assignments are the following
pin # 27: LED
pin # 4 :  Button

Picture of the breadboard




Code:




https://youtu.be/UARP5Cuh4FY