I am confused why this code for a blinking LED works:
void setup() {
pinMode(10, OUTPUT);
}
void loop() {
digitalWrite(10, HIGH);
delay(1000);
digitalWrite(10, LOW);
delay(1000);
}
but this code for a led that’s always on does not work:
void setup() {
pinMode(10, OUTPUT);
}
void loop() {
digitalWrite(10, HIGH);
}
I just want to keep one pin continuously on HIGH, but for some reason it doesn’t work; the led won’t come on. I have an LED connected to pin 10 and ground with a resistor.