Using a pushbutton
Turn a light on and off using a pushbutton.
I think it's very interesting to understand how sensors and controllers work. One thing is important is to know the difference between analogRead/Write and digitalRead/Write. There is no such method as digitalRead but we set pinMode to do that. By thinking about we need a boolean value or a value in range, I'm more confident with writing codes. By the way, map() is a good method to change value range. And remembering the electrical connection of all kinds of sensors and controllers is really important!
You can upload files of up to 20MB using this form.