D6 not declared problem

Hello,

I have trouble with making some code work on a third party Arduino Mega with ESP8266 that is supposed to control an WS2812B LED strip.

It was orgiginally used with a NodeMCU ESP8266 CP2102 using the Adafruit_NeoPixel library

It defines:

//Pin of ESP8266

const uint16_t Pin = D6;

That gave me the "D6 not declared"error when I tried to compile the code.

I learned D6 is not pin 6 on the mega board but rather pin 12 and adding

#define D6 12

to the code shoudl fix it. The code compiles fine without errors but the LEDs could not be bothered to light up.

The strip works fine when using the FastLED library. Any ideas here?

Thanks

Show the datasheet for this device. Show the sketch you are using. Show the errors you are receiving.

Which pin on the Mega do you have the LED strip connected to? If its I/O pin D6, then just use 6 in the sketch, not 12.

It has the same layout as the Mega-2560 but the in addition the WiFi chip. Arduino Mega 2560 Rev3 — Arduino Official Store

There are no errors, the program starts fine and connects to the Wifi but no signs of teh LEDs

Use the FastLED library.

Note that any pin on any of the ESP processors only ever produces a 3V3 signal. If the WS2812 strip is powered by 5V then it probably need a signal boost. This is one I have used for the Raspberry Pi but it is the same problem:-


Note while I have had good results with the 74LS14, others have suggested the 74HCT14 is better.

Thank you. So does that mean if the code runs on the 2560 processor the pins are powered at 5V, so that's why this strip is then working?

Thank you

Yes that is what I mean.