Try it
Start with an LED and pushbutton, then replace the button with a sensor. Record what changes in the code and electrical circuit.
A practical introduction to reading inputs and controlling outputs with a microcontroller.
Start with an LED and pushbutton, then replace the button with a sensor. Record what changes in the code and electrical circuit.