Button Controlled LED Using Raspberry Pi 4 B

Aim

The goal of the activity is to connect an LED and a button to an Raspberry pi 4 B board. The LED must be switched on or switched off, using the button

Materials Required

  1. Raspberry Pi 4 B -1    
  2. Breadboard – 1
  3. LED -1
  4. Push Button-1
  5. Several Jumper Wires   
  6. 220Ω Resistors – 1   
  7. Type-C USB Cable-1                                       

     

Wiring Diagram

Desired Outcome

Press the button, the LED must switch on. Press the button again and the LED must get switched off.