Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DHT22 Servo mbed
Fork of Program4_ServoWithTempAndHumidity by
Diff: main.cpp
- Revision:
- 3:98645a154332
- Parent:
- 2:3d87a559769a
- Child:
- 4:c778b9ed6508
diff -r 3d87a559769a -r 98645a154332 main.cpp
--- a/main.cpp Sat May 28 04:38:45 2016 +0000
+++ b/main.cpp Sat May 28 06:37:35 2016 +0000
@@ -29,15 +29,14 @@
// turn off the LED
myled = 1;
- // YOUR CODE HERE: get the status of the sensor checksum, sucessful or failed
+ // YOUR CODE HERE: get the status of the sensor checksum, successful or failed
// sensor checksum successful
if (status) {
- // printf the temperature from the sensor
+ // printf the temperature and humidity from the sensor
pc.printf("Temperature is %f C \r\n", sensor.getTemperature()/10.0f); //the readings need to be divided by 10
-
- // YOUR CODE HERE: printf the humidity from the sensor
+ pc.printf("Humidity is %f \r\n", sensor.getHumidity()/10.0f);
} else { // sensor checksum failed
