Wemos D1R2 - LED on D1/D2 (I2C)
Posted: Mon Aug 10, 2020 6:32 am
Hello, newbie question here.
I'm trying the simplest program with LED connected to D1 (or D2) but it does not work on these two pins (LED does not emit). I know these are supposed to be I2C pins but from what I read it should be possible to use them like that as well.
It actually works only when connected to D6/D5. No luck with other pins as well.
int led = D1;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
I'm trying the simplest program with LED connected to D1 (or D2) but it does not work on these two pins (LED does not emit). I know these are supposed to be I2C pins but from what I read it should be possible to use them like that as well.
It actually works only when connected to D6/D5. No luck with other pins as well.
int led = D1;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}