You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
556 B
26 lines
556 B
/* |
|
Blinky |
|
|
|
Toggles the LED of the Arduino repeatedly on and off. |
|
|
|
by Martin Stokroos |
|
m.stokroos@rug.nl |
|
*/ |
|
|
|
#define PIN_LED 13 |
|
|
|
// the setup function called once after reset |
|
void setup() { |
|
// initialize digital pin connected to the LED as an output. |
|
pinMode(PIN_LED, OUTPUT); |
|
} |
|
|
|
// infinite program loop |
|
void loop() { |
|
digitalWrite(PIN_LED, HIGH); // turn the LED on |
|
delay(500); // wait for half a second |
|
digitalWrite(PIN_LED, LOW); // turn the LED off |
|
delay(500); // wait for half a second |
|
} |
|
|
|
// end
|
|
|