-->
Page 1 of 1

Wemos D1R2 - LED on D1/D2 (I2C)

PostPosted: Mon Aug 10, 2020 6:32 am
by vrata48
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);
}

Re: Wemos D1R2 - LED on D1/D2 (I2C)

PostPosted: Tue Aug 11, 2020 9:17 am
by martinayotte
Are your LED connected as "sink" mode ?
Because if it is connected as "source", it pulldown the pin and prevent the ESP to boot in normal mode.

Image