Arduino 1: Intro and Digital Input/Output. (slides)
setup()- runs once, like
setup()in processing. reference
loop()- runs repeatedly, like
draw()in processing. reference
pinMode()- tell the arduino whether to use a pin as an input, an output, or the other things it can do (more later on that). reference
digitalRead()- reads the input on a digital pin. reference
digitalWrite()- sets the output on a digital pin. reference
The hello world of arduino. By default, the arduino will blink a built-in LED (“L”), next to the RX, TX, and POW lights.
LED_BUILTIN. (see constants in reference)
Let’s wire up our own LED attached to a different pin.
pinMode()is declared. Change
delay(). Experiment with how the delays change the blinking rate and duration.
from Sparkfun (link)