Closed slashplusdash closed 7 months ago
Because all values are zero.
ADC2 pins cannot be used if WIFI was used.
https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/
Thanks and I read all the documentation, does it mean that all ADC2 GPIO pins are disabled and cannot be used?
You should read the blog that I share.
If I try to test only the accelerometer, the x y z values are not 0
void loop() { // Read accelerometer values xaxis = analogRead(xPin); yaxis = analogRead(yPin); zaxis = analogRead(zPin);
// Print accelerometer values for debugging Serial.println("X-Axis: " + String(xaxis)); Serial.println("Y-Axis: " + String(yaxis)); Serial.println("Z-Axis: " + String(zaxis));
// Check Firebase readiness and send data if (Firebase.ready() && signupOK && (millis() - sendDataPrevMillis > 1000 || sendDataPrevMillis == 0)) { sendDataPrevMillis = millis();
}
delay(1000); // Add a delay to avoid overwhelming Firebase with requests }