Msg
This commit is contained in:
@@ -53,7 +53,7 @@ void loop() {
|
||||
send(msgMillis.set(cRun));
|
||||
sensorValue = analogRead(BATTERY_SENSE_PIN);
|
||||
v = sensorValue * 0.004659498;
|
||||
batteryPcnt = (v-3.0 * 100) / 1.2;
|
||||
batteryPcnt = ((v-3.0) * 100) / 1.2;
|
||||
sendBatteryLevel(batteryPcnt);
|
||||
send(msgVolts.set(v, 2));
|
||||
//}
|
||||
|
||||
@@ -16,6 +16,7 @@ monitor_speed = 115200
|
||||
upload_protocol = espota
|
||||
upload_port = 192.168.1.134
|
||||
lib_deps =
|
||||
# RECOMMENDED
|
||||
# Accept new functionality in a backwards compatible manner and patches
|
||||
closedcube/ClosedCube HDC1080 @ ^1.3.2
|
||||
closedcube/ClosedCube HDC1080 @ ^1.3.2
|
||||
mathertel/RotaryEncoder @ ^1.3.0
|
||||
robtillaart/PCF8574 @ ^0.2.1
|
||||
robtillaart/I2C_EEPROM @ ^1.3.0
|
||||
|
||||
@@ -653,8 +653,13 @@ void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties
|
||||
ee.writeBlock(8, (uint8_t*)&wUstavki, sizeof(wCounter));
|
||||
itoa(wUstavki.hDB, v, 10);
|
||||
mqttClient.publish("/home/vt/hdb", 1, false, v);
|
||||
} else
|
||||
if(strcmp(topic, "/home/vt/flood") == 0){
|
||||
pcf.write(LED_RED, !atoi(payload));
|
||||
c_flood = atoi(payload);
|
||||
}
|
||||
}
|
||||
|
||||
void onMqttPublish(uint16_t packetId) {
|
||||
//Serial1.println("Publish acknowledged.");
|
||||
//Serial1.print(" packetId: ");
|
||||
|
||||
Reference in New Issue
Block a user