This commit is contained in:
Marcus 2023-08-07 01:27:10 +02:00
parent 88fc817027
commit e0e88597f0
2 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ while 1:
# ser.readline()
Data = ser.readline().decode('ascii')
print(Data)
#outFile = open("arduino-fridge-powercontrol.json", "w")
#outFile.write(Data)
#outFile.close
outFile = open("arduino-fridge-powercontrol.json", "w")
outFile.write(Data)
outFile.close
##while 1:
## # { "command": "switch", "arg": "one", "state": "off", "ver":"1690931931"}

View File

@ -78,7 +78,7 @@ void loop() {
jsonOut[1]["temp"] = tempSensor2;
jsonOut[1]["state"] = fetState2;
serializeJson(jsonOut, Serial);
Serial.println();
delay(5000);
}