No Serial Print return with NeoPixel on ESP32 Dev board

I'm trying to migrate some code from a Mega to an ESP32-WROOM-32D. Other code seems to work great with Serial.print commands. Any code to control LEDs with the Neopixel library also seems to work. But for the life of me I can't figure out how to get debugging info to my Serial Monitor, while writing to LEDs with the Neopixel library. I backtracked to something much simpler like what's show below and I'm still not getting anything printed to the Monitor. My baud is set correctly on the monitor. I selected the recommended board. Same issue with the FastLED library. Any suggestions would be vey much appreciated. I've been at this for hours and I can't find the culprit.

#include <Adafruit_NeoPixel.h>
#define DATA_PIN 1
#define NUM_LEDS 12
Adafruit_NeoPixel pixels(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  Serial.begin(115200);
  pixels.begin();
}

void loop() {
  pixels.setPixelColor(0, pixels.ColorHSV(150));
  pixels.show();
  Serial.println("Test");
  delay(100);
}

D0, D1 are used for RX0, TX0 respectively, which are the pins for Serial0, the serial port used for SerialMonitor on a Mega. As such, The code you have listed should have had problems on the Mega.
I don't know if that's your ESP32 problem.

I'd switch your Pin 1 signal to some other pin for a test.
Hope that's it

1 Like

If I read this drawing correctly, GPIO01 is U0TXD of the programming port.

2 Likes

I was using a different port on the Mega, which is why it worked. But yes the pin was the issue. Switched pins and everything is roses. Thanks for the advice, very much appreciated. I wasted like two days on this figuring it was a software issue :person_facepalming:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.