-->
Page 1 of 1

Wemos D1 digital write pins not working

PostPosted: Mon Feb 24, 2020 12:57 am
by Plank
Hi, I am using Wemos D1 to implement led turn on and off program. I am using pin D8 to connect to led positive and negative to ground pin. The following is the code for the module :-
void setup() { pinMode(8,OUTPUT)
}
void loop() { digitalWrite(8, HIGH);
delay(3000);
digitalWrite(8, LOW);
delay(3000);
}
According to the code the LED should turn on and off after every 3 seconds. However, the led keeps on glowing and doesn't turn off.
Is there a error in my code or pin specification( like D8 )?

Re: Wemos D1 digital write pins not working

PostPosted: Tue Feb 25, 2020 1:13 am
by JurajA
if you select the right board in Tools menu
digitalWrite(D8, HIGH);
should work