ESP32S2 Feather onboard LEDS stopped working after upload

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Ujjc001
 
Posts: 10
Joined: Thu Nov 18, 2021 10:01 pm

ESP32S2 Feather onboard LEDS stopped working after upload

Post by Ujjc001 »

Board: Adafruit ESP32-S2 Feather - 2 MB PSRAM and STEMMA QT / Qwiic

Hi all, I'm new to the ESP32 line of boards, coming from strict arduino. I uploaded a simple sketch which appeard to take. From then on, none of the LEDs work. I tried a basic blink sketch with the LED on pin 13 and also a dotstar simple sketch with data pin 40 and clock pin 45, nothing works. None of the LEDs work. When I plug it into usb I do get the charge to blink a few times but then stops. Also, I know the code / board is working because I loaded a web server onto it to control the leds which worked, just failed to control the LEDs.
I also cannot get serial monitor to get any output (using the arduino IDE for all of this).
I also have the 128x128 monochrome SH1107 and tried to run that via the example sketch for the SH1107 which did not work either. Not sure what's going on.

Is there a way to re-load the default load so the board is "factory" again?
I got the pin ids from this, assuming they're the same for this new board with the PSRAM and STEMMA QT connection built in: https://unexpectedmaker.com/shop/feathers2-esp32-s2

Any ideas why no data seems to be going out on any pins?

Thank you very much!!!

User avatar
Ujjc001
 
Posts: 10
Joined: Thu Nov 18, 2021 10:01 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by Ujjc001 »

Sorry, that would have been the power led, not the charge led as I said initially, that would blink a very small amount when the usb is connected, then stops and continues to have no led activity on the board anywhere.

User avatar
Ujjc001
 
Posts: 10
Joined: Thu Nov 18, 2021 10:01 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by Ujjc001 »

More info- I didn't realize the Monochrome 1.12" 128x128 OLED Graphic Display I bought has a blue LED when powered. I hooked it up to another board- a nano, and it lit up, the LED that is, not the display. I read my little Nano isn't capable enough to run it, which is fine. But, it did something different, which is directional for me.

So, why is my ESP32S2 not supplying any voltage to the I2C pins?
Do I have a faulty board?

User avatar
Ujjc001
 
Posts: 10
Joined: Thu Nov 18, 2021 10:01 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by Ujjc001 »

Figuring some things out! Good news, I'm partially an idiot I think. I belive I had the wrong board selected and that was causing 90% of my problems.
-- I get serial output now.
-- I have blink working with on pin 13.
-- I got my OLED display working
---- had to power it from the 3v pin on the feather vs. from the stemma qt connection. I think I might actually have a bad board since it did power from the Nano with the wires but with the header pins vs. the quick connect connect wires. Also, when I did that the LED on the back of the display was green, not blue. Curious what the colors mean.

Now, I'd like to solve getting the onboard neopixel working. From this link https://unexpectedmaker.com/shop/feathers2-esp32-s2 it appears to be an APA102 style LED running on pins data 40 and clock 45. I tried that with no success. Though, when the board powers up now, that LED does blink once.
I tried to get the apa102 pixel running with neopixel code, dotstar code, and fastled code, none of which worked. The FastLED errored with "invalid pin" for 40 and 45. Tried to edit that code but didn't have time to dig in.
I'd like to get that LED working if anyone can help confirm what pins are used and the type of LED it is.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by adafruit2 »

can you link to the exact board you're using? theres' two feathers with ESP32-S2's and they're different boards! :)


User avatar
Ujjc001
 
Posts: 10
Joined: Thu Nov 18, 2021 10:01 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by Ujjc001 »

Thinking this other thread is relevant. I've cross posted both threads to one another.
viewtopic.php?f=57&t=185422&p=899128#p899128

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by adafruit2 »

ok the guide for the P5000 is coming soon, however for now here is example code that turns on the neopixel

Code: Select all

#include <Adafruit_NeoPixel.h>

#define NUMPIXELS        1

Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

// the setup routine runs once when you press reset:
void setup() {
  pinMode(NEOPIXEL_POWER, OUTPUT);
  digitalWrite(NEOPIXEL_POWER, HIGH);
  
  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
  pixels.setBrightness(20); // not so bright
}

// the loop routine runs over and over again forever:
void loop() {
  rainbow(10);             // Flowing rainbow cycle along the whole strip
}


// Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
void rainbow(int wait) {
  // Hue of first pixel runs 5 complete loops through the color wheel.
  // Color wheel has a range of 65536 but it's OK if we roll over, so
  // just count from 0 to 5*65536. Adding 256 to firstPixelHue each time
  // means we'll make 5*65536/256 = 1280 passes through this outer loop:
  for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {
    for(int i=0; i<pixels.numPixels(); i++) { // For each pixel in strip...
      // Offset pixel hue by an amount to make one full revolution of the
      // color wheel (range of 65536) along the length of the strip
      // (strip.numPixels() steps):
      int pixelHue = firstPixelHue + (i * 65536L / pixels.numPixels());
      // strip.ColorHSV() can take 1 or 3 arguments: a hue (0 to 65535) or
      // optionally add saturation and value (brightness) (each 0 to 255).
      // Here we're using just the single-argument hue variant. The result
      // is passed through strip.gamma32() to provide 'truer' colors
      // before assigning to each pixel:
      pixels.setPixelColor(i, pixels.gamma32(pixels.ColorHSV(pixelHue)));
    }
    pixels.show(); // Update strip with new contents
    delay(wait);  // Pause for a moment
  }
}
and I2C sensors (assumes a BME280 is attached)

Code: Select all

#include <Adafruit_BME280.h>
#include "Adafruit_LC709203F.h"

Adafruit_LC709203F lc;
Adafruit_BME280 bme; // I2C

#define I2C_POWER 7


void setup() {
  Serial.begin(115200);
  
  while(!Serial) delay(10);    // wait to get serial running
  
  Serial.println("Feather ESP32S2 Sensor test");

  // turn on the I2C power pin
  pinMode(I2C_POWER, OUTPUT);
  digitalWrite(I2C_POWER, LOW);
  
  if (! bme.begin()) {
      Serial.println("Could not find a valid BME280 sensor, check wiring, address, sensor ID!");
      while (1) delay(10);
  }
  Serial.println("Found BME280");

  if (!lc.begin()) {
    Serial.println(F("Couldnt find Adafruit LC709203F?\nMake sure a battery is plugged in!"));
    while (1) delay(10);
  }
  Serial.println("Found LC709203F");
  Serial.print("Version: 0x"); Serial.println(lc.getICversion(), HEX);
  lc.setPackSize(LC709203F_APA_500MAH); 
}


void loop() { 
  Serial.print("Temperature = ");
  Serial.print(bme.readTemperature());
  Serial.println(" *C");

  Serial.print("Pressure = ");

  Serial.print(bme.readPressure() / 100.0F);
  Serial.println(" hPa");

  Serial.print("Humidity = ");
  Serial.print(bme.readHumidity());
  Serial.println(" %");

  Serial.println();

  Serial.print("Batt Voltage: "); Serial.println(lc.cellVoltage(), 3);
  Serial.print("Batt Percent: "); Serial.println(lc.cellPercent(), 1);

  Serial.println();
  
  delay(1000);
}

User avatar
Ujjc001
 
Posts: 10
Joined: Thu Nov 18, 2021 10:01 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by Ujjc001 »

Cool!!! Everything's finally working again. I think. I have the I2C working, the neopixel, the LED on pin 13 (I think it was)... Are there any other LEDs I didn't know about?

I'm going to start to play around with the rest of the stuff now and actually do something withi this board now that I'm able to confirm everything seems to work fine. Can't wait to get the guide so I know what all the pins are and such.

Thanks for all the help!
Jeff

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ESP32S2 Feather onboard LEDS stopped working after uploa

Post by adafruit2 »

great! the pins are labeled on the bottom, they're the Arduino and CircuitPy pin names so you can start using either

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”