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: Grove_temp_sensor mbed
main.cpp@0:3fa32ef93fdc, 2016-03-09 (annotated)
- Committer:
- peipei123
- Date:
- Wed Mar 09 00:00:46 2016 +0000
- Revision:
- 0:3fa32ef93fdc
- Child:
- 1:e3c235c7edaf
Hello world Example
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| peipei123 | 0:3fa32ef93fdc | 1 | #include "mbed.h" |
| peipei123 | 0:3fa32ef93fdc | 2 | #include "Grove_temp_sensor.h" |
| peipei123 | 0:3fa32ef93fdc | 3 | AnalogIn Grove_temp_sensor(p15); |
| peipei123 | 0:3fa32ef93fdc | 4 | |
| peipei123 | 0:3fa32ef93fdc | 5 | int main() { |
| peipei123 | 0:3fa32ef93fdc | 6 | double temp; |
| peipei123 | 0:3fa32ef93fdc | 7 | while(1) { |
| peipei123 | 0:3fa32ef93fdc | 8 | temp = Grove_temp_sensor.read(); |
| peipei123 | 0:3fa32ef93fdc | 9 | printf("The temperature is: %5.2F C \n\r", temp); |
| peipei123 | 0:3fa32ef93fdc | 10 | } |
| peipei123 | 0:3fa32ef93fdc | 11 | } |
Grove Temperature Sensor