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);
}

Who is online

Users browsing this forum: No registered users and 2 guests