Arduino - Button Toggle LED
In a previous tutorial , We have learned how to turn on the LED if the button is pressed, and turn off LED if the button is released. In this tutorial, We are going to learn how to toggle LED each time button is pressed.
The tutorial includes two main parts:
- Button toggles LED without debouncing.
- Button toggles LED with debouncing.
|1||×||Arduino UNO or Genuino UNO|
|1||×||USB 2.0 cable type A/B|
|1||×||220 ohm resistor|
Image is developed using Fritzing. Click to enlarge image