Getting Started - LEDs
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Note: Most Arduinos have an on-board LED you can control. It is attached to pin 13 on the Uno.
*/
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(13, OUTPUT);
}
// the loop function runs over and over as long as the board has power
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
Section
Description



Last updated
