Skip to content

Commit

Permalink
Minor change to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
hsaturn committed Mar 24, 2021
1 parent 0d6e194 commit d92aa1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/simple-client/simple-client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ void loop()

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));

}

0 comments on commit d92aa1f

Please sign in to comment.