top of page
Millis/State machine
We use a button, 2 resistors, and an Led to test out our Arduino.
2
1.
We connect the led's with the resistors.
2.
We now power the bread board from ground and 5v pins on the Arduino to the rails of the bread board.
3
3.
We now connect the digital pins 3, 4 to the led. Pin 4 goes to the green led, and pin 3 goes to the red led.
Code
4.
Software:
We read the button on pin 2. If the button is LOW [0v/gnd] then it is not pressed. If the button is HIGH [5v/vcc] then it IS pressed.
Note:
You can use this to scan multiple buttons while blinking an led, or running code while other code is processing.
More Info coming soon!
bottom of page