Flash the ThinkerShield's D12 LED on for one second, off for one second, forever. The first Arduino sketch.
From the unit Crack the Code
· activity PRP 1: Digital output — Blink
void setup() { // runs once when you press reset or power the board
pinMode(12, OUTPUT); // make digital pin 12 an output
}
void loop() { // runs over and over again, forever
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for one second (1000 milliseconds)
digitalWrite(12, LOW); // turn the LED off (LOW)
delay(1000); // wait for one second
}
Shared from Little Bird Electronics curriculum.