Tilt Switch using STM32 -NUCLEO

Aim

The goal of this activity is to demonstrate the use of a tilt switch as a switch that opens or closes the circuit.

Materials Required

  1. STM32 -NUCLEO -1    
  2. Breadboard – 1
  3. LED -1
  4. Tilt Switch -1
  5. Several Jumper Wires   
  6. 220Ω Resistors – 2
  7. Mini USB Cable-1  

Wiring Diagram

Desired Outcome

 When the tilt switch is in a vertical position, the LED is off, and when it’s in a horizontal position, the LED turns on.