progress
This commit is contained in:
parent
88fc817027
commit
e0e88597f0
2 changed files with 4 additions and 4 deletions
6
main.py
6
main.py
|
@ -16,9 +16,9 @@ while 1:
|
||||||
# ser.readline()
|
# ser.readline()
|
||||||
Data = ser.readline().decode('ascii')
|
Data = ser.readline().decode('ascii')
|
||||||
print(Data)
|
print(Data)
|
||||||
#outFile = open("arduino-fridge-powercontrol.json", "w")
|
outFile = open("arduino-fridge-powercontrol.json", "w")
|
||||||
#outFile.write(Data)
|
outFile.write(Data)
|
||||||
#outFile.close
|
outFile.close
|
||||||
|
|
||||||
##while 1:
|
##while 1:
|
||||||
## # { "command": "switch", "arg": "one", "state": "off", "ver":"1690931931"}
|
## # { "command": "switch", "arg": "one", "state": "off", "ver":"1690931931"}
|
||||||
|
|
|
@ -78,7 +78,7 @@ void loop() {
|
||||||
jsonOut[1]["temp"] = tempSensor2;
|
jsonOut[1]["temp"] = tempSensor2;
|
||||||
jsonOut[1]["state"] = fetState2;
|
jsonOut[1]["state"] = fetState2;
|
||||||
serializeJson(jsonOut, Serial);
|
serializeJson(jsonOut, Serial);
|
||||||
|
Serial.println();
|
||||||
delay(5000);
|
delay(5000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue