We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a6841d + 8a54c70 commit 99bc0a0Copy full SHA for 99bc0a0
libraries/Bridge/examples/TemperatureWebPanel/TemperatureWebPanel.ino
@@ -98,9 +98,9 @@ void loop() {
98
Serial.println(timeString);
99
int sensorValue = analogRead(A1);
100
// convert the reading to millivolts:
101
- float voltage = sensorValue * (5000 / 1024);
+ float voltage = sensorValue * (5000.0f / 1024.0f);
102
// convert the millivolts to temperature celsius:
103
- float temperature = (voltage - 500) / 10;
+ float temperature = (voltage - 500.0f) / 10.0f;
104
// print the temperature:
105
client.print("Current time on the Yún: ");
106
client.println(timeString);
0 commit comments