analogSetAttenuation(ADC_11db); bricked my ESP32-WRover-B

Duncro
Posts: 1
Joined: Sun Jan 12, 2020 10:30 am

analogSetAttenuation(ADC_11db); bricked my ESP32-WRover-B

Postby Duncro » Sun Jan 12, 2020 10:37 am

Was trying to fix an issue with read analogue getting ghost values even with pulldown resistors, so made a quick sketch.
Tried adding analogSetAttenuation to the test sketch to fix it, now the moduel is dead, ntoeven being seen on the com port.

Code: Select all

const int
    C1 = 25,
    C2 = 33,
    C3 = 32;
int read1,read2,read3;

void setup() {
  Serial.begin(115000);
  // put your setup code here, to run once:
  pinMode(C1, INPUT);
  pinMode(C2, INPUT);
  pinMode(C3, INPUT);
  analogSetAttenuation(ADC_11db); <adding this bricked the module
}

void loop() {
  // put your main code here, to run repeatedly:
  read1 = analogRead(C1);
  read2 = analogRead(C2);
  read3 = analogRead(C3);
  Serial.println((String)read1+":"+(String)read2+":"+(String)read3);
  delay(100);
}

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: analogSetAttenuation(ADC_11db); bricked my ESP32-WRover-B

Postby ESP_Sprite » Tue Jan 21, 2020 10:38 am

How do you figure that bricked the ESP32? As that call has been used and tested before, it sounds unlikely. Could there be some other thing happening around the same time that was the more likely culprit?

Who is online

Users browsing this forum: No registered users and 57 guests