
Temperature + Digital Disapley
Dependencies: DigitDisplay mbed
Fork of Grove_Thermometer by
Revision 2:c62f7e612d5e, committed 2015-02-08
- Comitter:
- JokerChuang
- Date:
- Sun Feb 08 08:36:11 2015 +0000
- Parent:
- 1:b4a3436b7cd0
- Commit message:
- Modify
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b4a3436b7cd0 -r c62f7e612d5e main.cpp --- a/main.cpp Sun Feb 08 08:32:24 2015 +0000 +++ b/main.cpp Sun Feb 08 08:36:11 2015 +0000 @@ -5,7 +5,7 @@ * connect a Grove 4 digit LED display to the UART connector * The temperature will be displayed in Celcius * Modified by David Bottrill from the original Arduino code -* By: http://www.seeedstudio.com +* Reference: http://www.seeedstudio.com */ #include "mbed.h" @@ -29,9 +29,9 @@ resistance=(float)(1023-a)*10000/a; //get the resistance of the sensor; temperature=1/(log(resistance/10000)/B+1/298.15)-273.15; //convert to temperature via datasheet ; myled = 1; - wait(0.5); + wait(0.8); myled = 0; - wait(0.5); + wait(0.8); display.write(temperature); } }