Night light to dimmer & percent extsens

This commit is contained in:
2020-11-14 18:00:14 +03:00
parent 3314626daa
commit b577488bbd
2 changed files with 33 additions and 65 deletions

View File

@@ -53,7 +53,7 @@ void loop() {
send(msgMillis.set(cRun));
sensorValue = analogRead(BATTERY_SENSE_PIN);
v = sensorValue * 0.004659498;
batteryPcnt = (v * 100) / 4.2;
batteryPcnt = (v-3 * 100) / 1.2;
sendBatteryLevel(batteryPcnt);
send(msgVolts.set(v, 2));
//}