Minor change to publish

This commit is contained in:
hsaturn
2021-03-24 21:20:07 +01:00
parent 0d6e194560
commit d92aa1fe3c

View File

@@ -42,7 +42,11 @@ void loop()
delay(1000); delay(1000);
temp += (random(100)>50 ? 0.1 : -0.1); auto rnd=random(100);
if (rnd > 66) temp += 0.1;
else if (rnd < 33) temp -= 0.1;
client.publish("sensor/temperature", String(temp)); client.publish("sensor/temperature", String(temp));
} }