Two Way Switch Raspberry Pi 4 B

Aim

The goal of the activity is to demonstrate the use of a two-way switch operation using an LED and two buttons connected to a Raspberry pi 4 B board. The LED can be switched on by one of the two buttons and be switched off by the other button.

Materials Required

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

     

Wiring Diagram

Desired Outcome

The LED can be switched on by using either of the buttons and switched off with the same or the other button.