Wemos D1 mini not working

BertD2023
Posts: 1
Joined: Tue Nov 21, 2023 11:36 am

Wemos D1 mini not working

Postby BertD2023 » 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?

hobby_guy
Posts: 20
Joined: Sat Jan 29, 2022 3:29 pm

Re: Wemos D1 mini not working

Postby hobby_guy » Wed Nov 22, 2023 7:40 pm

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!) ?

Macx75
Posts: 2
Joined: Tue Dec 12, 2023 8:32 am

Re: Wemos D1 mini not working

Postby Macx75 » Tue Dec 12, 2023 8:38 am

I have been using the same under LOLIN(WEMOS) lite and manage to get it blink

User avatar
Inq720
Posts: 38
Joined: Fri Dec 22, 2023 1:36 pm
Location: North Carolina, USA
Contact:

Re: Wemos D1 mini not working

Postby Inq720 » Fri Dec 22, 2023 2:32 pm

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);

Image

Hope this helped.

Who is online

Users browsing this forum: No registered users and 3 guests