Do you remember that we control the led using a button in example “button”? The problem we meet is when our finger push the button, the led will on, however when finger leave from the button, led off. Only we hold the button, the led will be light on.
In this experiment, we just press the button, led status will be change to another status. so if led is off, we just press the button once, led can be light on.
We need a Arduino board, a led module, a button module.
Attach led to D9, Attach button to D5.
In this experiment, we use scoop library. scoop detect button status, when we press the button, it will change the led status.
6,771 total views, 4 views today