Page 1 of 1
Wemos D1 mini not working
Posted: Tue Nov 21, 2023 11:55 am
by BertD2023
Hi,
I have reasonable experience with Arduino’s, for a project though I am planning to use the D1 mini.
Connecting it to Arduino CC was not the biggest issue but the sketch I have written for Arduino did not work.
So I started something simple, turning the internal Led on and of. That works fine.
But then a Led on a port, have tried several like D3, D4 and D6.
digitalWrite (6, HIGH) and (LOW) does not have any effect. I even did put in pinMode(6, OUTPUT)
In boardmager I have selected LOLIN(WEMOS) D1 R2, and also checked ESP 8266 generic.
I expect its something simple what I have missed?
Re: Wemos D1 mini not working
Posted: Wed Nov 22, 2023 7:40 pm
by hobby_guy
Please post the code (entire sketch), and your schematic or a picture of the D1 with the LED connected.
If you tried setting the output to both HIGH and LOW, then the LED should light up in one of the cases (depending on what way/orientation you attached the LED). Remember to also include a current limiting resistor (I typically use something around 300-500 ohm) to protect the LED.
Hehe, have you checked the LED separately, connecting it across VCC (3.3V I assume) and GND (with a resistor!) ?
Re: Wemos D1 mini not working
Posted: Tue Dec 12, 2023 8:38 am
by Macx75
I have been using the same under LOLIN(WEMOS) lite and manage to get it blink
Re: Wemos D1 mini not working
Posted: Fri Dec 22, 2023 2:32 pm
by Inq720
BertD2023 wrote: ↑Tue Nov 21, 2023 11:55 am
Hi,
I have reasonable experience with Arduino’s, for a project though I am planning to use the D1 mini.
Connecting it to Arduino CC was not the biggest issue but the sketch I have written for Arduino did not work.
So I started something simple, turning the internal Led on and of. That works fine.
But then a Led on a port, have tried several like D3, D4 and D6.
digitalWrite (6, HIGH) and (LOW) does not have any effect. I even did put in pinMode(6, OUTPUT)
In boardmager I have selected LOLIN(WEMOS) D1 R2, and also checked ESP 8266 generic.
I expect its something simple what I have missed?
I'll take a wild stab at your problem. If you're used to Arduino boards, the stencils on the board are the same as the pin numbers. On 3rd party boards like Espressif boards, the pins are labeled Dx. You'll find that the "D" number does not coincide with the PIN number.
For instance, WeMos D6 is actually GPIO12 (or simply 12). All you need to do is use the same labels in your code that is on the board... so instead of: digitalWrite(6, HIGH);
Use:
digitalWrite(D6, HIGH);
Hope this helped.