don't retain volatile values
This commit is contained in:
@ -16,7 +16,7 @@ void DeviceLdr::deviceLoop() {
|
||||
float ldr_float = map(ldr, 0, 1023, 0, 10000) / 100.0;
|
||||
Serial.print("LDR: ");
|
||||
Serial.println(ldr_float);
|
||||
if (!Homie.setNodeProperty(ldrNode, "value", String(ldr_float), true)) {
|
||||
if (!Homie.setNodeProperty(ldrNode, "value", String(ldr_float), false)) {
|
||||
Serial.println("Sending failed");
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user