Computers & Electronics
Arduino Intro: Blinking LED
13K views
·
Dec 22, 2023
Arduino Blinking LED code:
/*
blink
1. Turn on LED for 1 second
2. Turn off LED for 1 second
3. Repeat
*/
int pinled = 9;
void setup() {
// initialize the digital pin as an output.
pinMode(pinled, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(pinled, HIGH); // turn the LED on
delay(1000); // wait for a second
digitalWrite(pinled, LOW); // turn the LED off
delay(1000); // wait for a second
}
Show More
Show LessComments
loading text loading
loading text loading
loading text
loading text loading
loading text
loading text loading
loading text
loading text loading
loading text