[SOLVED] Wemos D1 not working with basic example

Hi,

  1. yes that’s the code I’m using.
  2. I’ve just tried using the onboard LED, same issue (tied both setting Blink to D2 and D4).
  3. Blink button set to switch mode.

Thanks for the speedy answers !

I’m using a Full Wemos D1 not the mini.

If I change something in the Blynk configuration (like changing the pin), do I need to refresh, or is that info immediately “saved and used” ?

Maybe just change the example to a pin which works on all/majority for the boards ?

That wouldn’t work because the problem isn’t related to pins it’s related to pin labelling.

Check the pin map link I provided. It’s for the Mini because WeMos have removed the map for the full WeMos D1 from their site but I believe it’s the same general mapping.

WeMos did change at least 1 pin map between the original D1 and rev 2.

So to recap, the notes refer to GPIO numbers not WeMos pin labels, use the map.

It will get more confusing when you actually start coding for the WeMos because then there is a GPIO to pin label mapping system that can be used. I NEVER use D references for ESP’s, always GPIO references and a map.

Roger that, see the debug info now.

[163727] >[14]U[01|00|06]
[163728] >dw[00]4[00]1
[167258] >[14]<[B2|00|06]
[167258] >dw[00]4[00]0
[167859] <[06|00|12|00|00]
[167890] >[00|00|12|00|C8]
[177891] <[06|00|13|00|00]
[177928] >[00|00|13|00|C8]

Actually I have probably confused everyone, me included.

Blynk actually maps the WeMos pin labels to the relevant digital pins (GPIO).
So if you select a WeMos board in the app and then allocate a button to label D3 it will control GPIO 0.

In my defence, serious Blynkers hardly ever use digital pins as the virtual pins are so much more powerful.

Also for WeMos’ I normally select the generic ESP8266 board in the app as there are some features not available when you select WeMos.

What pins are you using in the app and on the WeMos?

Presumably D4 from your log, right?

Wemos D1 info.

https://wiki.wemos.cc/products:d1:d1

D4 on the app trying to use the on board LED.

First is D4 pressed, second is D2 pressed. Nothings makes the onboard LED go on. (I’ve put those two lines in bold).


/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.4.8 on Arduino

[2321] Free RAM: 45776
[5001] Connecting to blynk-cloud.com:8442
[5076] <[02|00|01|00] 48329e9fe22e4ce3be7b579d2bb146c9
[5130] >[00|00|01|00|C8]
[5131] Ready (ping: 12ms).
[5131] <[11|00|02|00]Hver[00]0.4.8[00]h-beat[00]10[00]buff-in[00]1024[00]dev[00]Arduino[00]build[00]Jul 15 2017 16:36:32[00]
[5247] >[14|00|01|00|15]
[5247] >pm[00]4[00]out[00]16[00]out[00]5[00]out
[5268] >[00|00|02|00|C8]
[15247] <[06|00|03|00|00]
[15279] >[00|00|03|00|C8]
[25280] <[06|00|04|00|00]
[25313] >[00|00|04|00|C8]
[30412] >[14]FX[00|06]
[30413] >dw[00]4[00]1
[34679] >[14|04|B7|00|07]
[34679] >dw[00]16[00]1
[35314] <[06|00|05|00|00]
[35355] >[00|00|05|00|C8]

Using a WeMos with Blynk is normally child’s play. Can’t undersand what your problem is.

Presumably you selected WeMos D1 device in the app, right?

You could try switching to the ESP8266 device and there you will see gp0, gp1, gp2 etc rather than “D” pins.
For the onboard LED you would want gp2. I think the LED is active LOW so the Blynk button will work in reverse i.e. ON will turn LED off etc. That’s another reason to use virtual pins but don’t consider that until you have completed this elementary step.

as per my last post, you will need to have the button in the off position to turn on the onboard LED.
You can change the labels in the app so OFF becomes ON etc but later you will move to virtual pins.

I understand, but have been toggling the buttons on and off so I agree the positions would be wrong but in one of the two I should see the LED come on right ?

All I can suggest is switch to ESP8266 and see how that goes.

Switching the device to EPS8266 solved the issue … not sure where the cause could be.

Costas, I owe you a Belgian Beer if you are ever in the neighborhood :wink: !

Very, very, very occasionally when you select a device it appears not to recognise it. You can remove the device, refresh the token etc or switch to ESP8266 etc.

That takes me back to a booze cruise to Ostend.

Just for your information. As I understand them… The device choices in the App determine:

  • How the App maps device layout to our visual reference. Things like Digital and Analog Pins with designations (A, D, or GPIO) and numbering; If only using Virtual Pins, then you could probably use any device choice for any project…

  • And limits the “available” number of Vpins, probably due to “processing power” of a device… but that can be adjusted with a single define in the sketch - #define BLYNK_USE_128_VPINS

You have to use Blynk Widget Digital D9 to control the onboard LED. Must be a mapping problem in the Blynk or Wemos drivers. Here’s what I’ve discerned by trial-and-error on my Wemos D1 mini:

Wemos pin    Blynk Widget Button   ESP8266 pin
----------   -------------------   ------------
    D0                 D2               16
    D1                 D3                5
    D2                 D4                4
    D3                 D8                0
    D4                 D9                2 (Built-in LED)
    D5                 D5               14
    D6                 D6               12
    D7                 D7               13
    D8                 D10              15