Wemos code and/or wiring problem

I made a 60 pixel ring clock using the Arduino Uno and a RTC module. I works perfectly however, I wanted to have the time on the clock set by an NTP server using a Wemos D1 mini and eliminate the need for the RTC module and the Uno. My understanding is that the Wemos mini is Arduino compatible. First I wrote the code to access the NTP server and get the date and time. I also added a function to compensate for DST. I tested the code using the serial monitor and it worked great.

I modified my ring clock code eliminating all references to the RTC module and then integrated the NTP code into into my ring clock code. Everything compiled fine and uploaded to the Wemos. First I checked the code in the serial monitor again and it was working ok displaying the time as expected.

Next I wired the LED pixel ring to the Wemos, Vcc on the pixel ring to 5V on the Wemos, ground to ground and the Data In on the pixel ring to D4 on the Wemos. The only difference between the Wemos wiring and the UNO is that I used pin D10 on the Uno and pin D4 on the Wemos. I don’t believe that should make a difference.

The problem is that none of the pixels on the ring light up. It is likely something in my code that I'm not seeing. As I said, the code works fine in the serial monitor, although that won’t tell me anything about the led ring. I know that the pixel ring is ok because I hooked it back up with my clock code and it works.

I have attached a diagram if the wiring and also my code. I’m hoping that someone familiar with the Wemos might see something that I don’t or something in the code that is not correct but not flagging an error.

Any help appreciated.

Wemos Wiring.jpg

RingClock_V1.ino (5.98 KB)

D4 is io 2 a boot configuration pin that must not be LOW at boot. usually it has a pull-up on board.
I am on smartphone and can't see the attached ino file. did you use D4 constant as pin number in sketch?
did you check the doc if the ring reads 3.3V as HIGH

When I modified the clock code I changed the pin from pin 10 to pin 4. Here is a snippet showing the pin definition and the line to set that pin for the pixel ring data.

#include <Adafruit_NeoPixel.h>
#include <NTPClient.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>

#define PIN 4
#define PIXEL 60
#define getNTPtime

int LED = 0;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL, PIN, NEO_GRB + NEO_KHZ800);

I used the 5V when I used the UNO and everything works fine there so I used the same on the Wemos. Are you suggesting that I should use a different pin on the Wemos? D5 perhaps?

D4 is not 4.
use #define PIN D4

esp8266 is a 3.3V chip. if the pin is HIGH it is not 5 V as on Uno, but only 3.3V. not all 5 V devices read 3.3V as HIGH

That worked!!! Thank you so much. I REALLY appreciate your time and help.

Cheers!