Testing out the push button
In this section, we will focus on testing a push button. Before using it with a microcontroller board, it's a good idea to try it out to see if it works mechanically, and testing allows us to find out if the push button is normally closed or normally opened. The following image shows how to connect all the components to try out the push button:
As you can see, we don't need to connect a push button to a microcontroller board to test it. Here are the steps for connecting the components and testing the push button:
- Connect the batteries' positive (+) terminal to one pin of the push button.
- Connect the other push button pin to the 220-ohm resistor.
- Connect the 220-ohm resistor to the LED's anode pin.
- Connect the LED's cathode pin to the batteries' negative (-) terminal. Be careful when connecting the LED...