Arduino Basics Handling Multiple States
learnelectronics learnelectronics
168K subscribers
120,174 views
0

 Published On Jan 4, 2017

Handling multiple states is one of the keystones of programming. In this example we use one button to cycle through 3 LEDs. This gives us a 4 states (all off, red,green,yellow). By passing the state between variables we can cycles through them with ease. This example uses the button debouncing code that was described in this video:
   • How to debounce a button for Arduino  

~-~~-~~~-~~-~
May I suggest: "10 PCB's for two bucks!"
   • 10 PCB's for two bucks!  
~-~~-~~~-~~-~

show more

Share/Embed