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: DigitDisplay RangeFinder Pulse Grove_temperature FXOS8700Q
main.cpp@0:21d86aae6b2a, 2018-08-07 (annotated)
- Committer:
- MACRUM
- Date:
- Tue Aug 07 04:36:25 2018 +0000
- Revision:
- 0:21d86aae6b2a
- Child:
- 1:dddc62cabd99
Initial commit;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MACRUM | 0:21d86aae6b2a | 1 | #include "mbed.h" |
| MACRUM | 0:21d86aae6b2a | 2 | #include "Grove_temperature.h" |
| MACRUM | 0:21d86aae6b2a | 3 | |
| MACRUM | 0:21d86aae6b2a | 4 | Grove_temperature temp(A4); |
| MACRUM | 0:21d86aae6b2a | 5 | Serial pc(USBTX, USBRX); |
| MACRUM | 0:21d86aae6b2a | 6 | |
| MACRUM | 0:21d86aae6b2a | 7 | // main() runs in its own thread in the OS |
| MACRUM | 0:21d86aae6b2a | 8 | int main() { |
| MACRUM | 0:21d86aae6b2a | 9 | pc.baud(115200); |
| MACRUM | 0:21d86aae6b2a | 10 | while (true) { |
| MACRUM | 0:21d86aae6b2a | 11 | pc.printf("temperature = %2.2f\n", temp.getTemperature()); |
| MACRUM | 0:21d86aae6b2a | 12 | wait(1); |
| MACRUM | 0:21d86aae6b2a | 13 | } |
| MACRUM | 0:21d86aae6b2a | 14 | } |
| MACRUM | 0:21d86aae6b2a | 15 |