-->
Page 2 of 2

Re: D1 (retired) PinMode bug

PostPosted: Thu Sep 29, 2016 11:18 am
by schufti
I assume he is referring to the Wemos D1 (Uno size) board.

Unfortunately these boards (like nodemcu) use different pin names.

So most likely he wants to change mode of D8 [pinMode(D8, OUTPUT);] and not gpio8 [pinMode(8, OUTPUT);] ... provided the correct board is selected in general.

Re: D1 (retired) PinMode bug

PostPosted: Sat Jul 20, 2019 7:10 am
by ateeb327
Hello, I was getting the same wdt reset error while trying to use pinMode with digitalWrite() function.
I solved it by figuring out how the Wemos Pin mapping works.
Actually, you need to refer the pin in 'Dx' notation.
e.g
Code: Select alldigitalWrite(D15,LOW);

or
Code: Select allpinMode(D15, OUTPUT);


Also, make sure to select "Wemos D1 R1" in Tools > Boards so that Dx constants will match
the labels.