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.
Fork of DHT11_with_Nucleo by
Revision 11:1379308ecace, committed 2015-01-20
- Comitter:
- kaliczp
- Date:
- Tue Jan 20 02:21:22 2015 +0000
- Parent:
- 10:774c12ebf0f2
- Child:
- 12:31645d013d6c
- Commit message:
- Use decimal numbers to communicate data!
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jan 14 13:11:36 2015 +0000 +++ b/main.cpp Tue Jan 20 02:21:22 2015 +0000 @@ -48,11 +48,11 @@ myled = 1; // LED is ON dht_read(); // Call the function // Send result through UART result - pc.printf("%X", (adat & 0x000000ffff000000) >> 24); // Humidity + pc.printf("%d", (adat & 0x000000ff00000000) >> 32); // Humidity pc.printf("\n\r"); // Send a new line and carriage return. - pc.printf("%X", (adat & 0x0000000000ffff00) >> 8 ); // Temperature + pc.printf("%d", (adat & 0x0000000000ff0000) >> 16 ); // Temperature pc.printf("\n\r"); - pc.printf("%X", adat & 0x00000000000000ff); // Checksum. + pc.printf("%d", adat & 0x00000000000000ff); // Checksum. pc.printf("\n\r"); wait_ms(200); // Wait 0.2 sec till continue. } else {