Programme d'exemple Thermistance Grove v1.2
Dependencies: Grove_temperature
main.cpp@1:788ae528afd1, 2019-08-13 (annotated)
- Committer:
- bastienvincke
- Date:
- Tue Aug 13 16:41:57 2019 +0000
- Revision:
- 1:788ae528afd1
- Parent:
- 0:21d86aae6b2a
V1 BV
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 | |
bastienvincke | 1:788ae528afd1 | 4 | Grove_temperature temp(PA_1); // La thermistance est connecté sur le port ANA A1 |
MACRUM | 0:21d86aae6b2a | 5 | |
MACRUM | 0:21d86aae6b2a | 6 | int main() { |
MACRUM | 0:21d86aae6b2a | 7 | while (true) { |
bastienvincke | 1:788ae528afd1 | 8 | printf("temperature = %2.2f\n", temp.getTemperature()); |
MACRUM | 0:21d86aae6b2a | 9 | wait(1); |
MACRUM | 0:21d86aae6b2a | 10 | } |
MACRUM | 0:21d86aae6b2a | 11 | } |
MACRUM | 0:21d86aae6b2a | 12 |