Button
Adding a push button to your circuit.
A button is a digital device, it reads either pressed or not pressed.
The Arduino is set up to consider a reading of 5V as “true”, so with
the circuit below,
I will use
when green flag clicked
forever
set [button pressed? v] to < not < digital reading (10) :: #468cfc> >
if (button pressed?) then
say [Pressed] for (0.5) seconds
else
say [Not Pressed] for (0.5) seconds
Last modified August 25, 2021: added ecs 2018 material (ceb74e0)