Msg
This commit is contained in:
@@ -24,7 +24,7 @@ void setup() {
|
||||
analogReference(INTERNAL);
|
||||
sensorValue = analogRead(BATTERY_SENSE_PIN);
|
||||
v = sensorValue * 0.004659498;
|
||||
batteryPcnt = (v * 100) / 4.2;
|
||||
batteryPcnt = (v-3.0 * 100) / 1.2;
|
||||
while (myAHT10.begin() != true)
|
||||
{
|
||||
Serial.println(F("AHT10 not connected or fail to load calibration coefficient")); //(F()) save string to flash & keeps dynamic memory free
|
||||
@@ -53,7 +53,7 @@ void loop() {
|
||||
send(msgMillis.set(cRun));
|
||||
sensorValue = analogRead(BATTERY_SENSE_PIN);
|
||||
v = sensorValue * 0.004659498;
|
||||
batteryPcnt = (v-3 * 100) / 1.2;
|
||||
batteryPcnt = (v-3.0 * 100) / 1.2;
|
||||
sendBatteryLevel(batteryPcnt);
|
||||
send(msgVolts.set(v, 2));
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user