Hepta Temperature Sensor
Dependencies: mbed HeptaBattery HeptaTemp
Fork of Lab7-01_template by
main.cpp@19:54d195eeaaee, 2019-08-19 (annotated)
- Committer:
- HEPTA
- Date:
- Mon Aug 19 06:23:52 2019 +0000
- Revision:
- 19:54d195eeaaee
- Parent:
- 17:100ec053eb3b
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
HEPTA | 17:100ec053eb3b | 2 | #include "HeptaBattery.h" |
HEPTA | 14:71b3e6d7d41b | 3 | #include"HeptaTemp.h" |
HEPTA | 14:71b3e6d7d41b | 4 | |
HEPTA | 14:71b3e6d7d41b | 5 | Serial pc(USBTX, USBRX); |
HEPTA | 19:54d195eeaaee | 6 | HeptaBattery battery(p16,p26); |
HEPTA | 14:71b3e6d7d41b | 7 | HeptaTemp temper(p17); |
HEPTA | 14:71b3e6d7d41b | 8 | |
umeume | 2:1c5cdb2c3e0f | 9 | int main() |
umeume | 2:1c5cdb2c3e0f | 10 | { |
HEPTA | 14:71b3e6d7d41b | 11 | pc.baud(9600); |
HEPTA | 14:71b3e6d7d41b | 12 | float temp; |
HEPTA | 14:71b3e6d7d41b | 13 | for (int i=0;i<10;i++) { |
HEPTA | 14:71b3e6d7d41b | 14 | temper.temp_sense(&temp); |
HEPTA | 14:71b3e6d7d41b | 15 | pc.printf("temp = %f\r\n",temp); |
HEPTA | 14:71b3e6d7d41b | 16 | wait(1.0); |
HEPTA | 14:71b3e6d7d41b | 17 | } |
umeume | 2:1c5cdb2c3e0f | 18 | } |