Arduino
Arduino
// LED connected
// sets the
digitalWrite(ledPin, HIGH);
[Get Code]
set the ledPin (pin 13) to HIGH, or 5
volts. Writing a LOW to pin connects it to
ground, or 0 volts.
The delay() causes the Arduino to wait
for the specified number of milliseconds
before continuing on to the next line. There
are 1000 milliseconds in a second, so the
line:
delay(1000);
[Get Code]
creates a delay of one second.
setup() and loop()
Exercises