Migrated to littlefs on esp32 + fix A0 pin
This commit is contained in:
@ -92,7 +92,7 @@ void ErrorFileLog::addEntry(String err) {
|
||||
_errors[i] = _errors[i - 1];
|
||||
}
|
||||
_errors[0] = err;
|
||||
Log.errorln(err.c_str());
|
||||
Log.error(err.c_str());
|
||||
save();
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ void BatteryVoltage::read() {
|
||||
// The analog pin can only handle 3.3V maximum voltage so we need to reduce
|
||||
// the voltage (from max 5V)
|
||||
float factor = myConfig.getVoltageFactor(); // Default value is 1.63
|
||||
int v = analogRead(A0);
|
||||
int v = analogRead(PIN_A0);
|
||||
|
||||
// An ESP8266 has a ADC range of 0-1023 and a maximum voltage of 3.3V
|
||||
// An ESP32 has an ADC range of 0-4095 and a maximum voltage of 3.3V
|
||||
|
Reference in New Issue
Block a user