Arduino Intro: 4 LEDs 2 Pins, 2 LEDs 1 Pin
Dec 22, 2023
Arduino sketch:
/*
4 LEDs 2 Pins
1. Turn on the first pair of LEDs and turn off
the other pair of LEDS at the same time,
for 1 second.
2. Turn off the first pair of LEDs and turn on
the other pair of LEDS at the same time,
for 1 second.
3. Repeat
*/
int pinLED1=9,pinLED2=5;
void setup() {
// put your setup code here, to run once:
pinMode(pinLED1,OUTPUT);
pinMode(pinLED2,OUTPUT);
}
Show More Show Less #Computers & Electronics


