switch (scoop)

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.

08-scoop-switch

8

In this experiment, we use scoop library. scoop detect button status, when we press the button, it will change the led status.

5,903 total views, 1 views today

Leave a comment