- add self updating function. You can start an update from onscreen menu
This commit is contained in:
Stephan Mühl
2023-03-23 22:11:46 +01:00
parent e590e22923
commit 396e1f1cf9
13 changed files with 214 additions and 22 deletions

View File

@@ -168,9 +168,7 @@ void PeripheryManager_::tick()
{
previousMillis_BatTempHum = currentMillis_BatTempHum;
uint16_t ADCVALUE = analogRead(BATTERY_PIN);
Serial.println(ADCVALUE);
BATTERY_PERCENT = min((int)map(ADCVALUE, 510, 665, 0, 100), 100);
Serial.println(BATTERY_PERCENT);
CURRENT_LUX = (roundf(photocell.getSmoothedLux() * 1000) / 1000);
sht31.readBoth(&CURRENT_TEMP, &CURRENT_HUM);
CURRENT_TEMP -= 9.0;