![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Erdäpfel
main.cpp@0:2faef44cbd2c, 2017-04-21 (annotated)
- Committer:
- TFuchsbichler
- Date:
- Fri Apr 21 06:03:54 2017 +0000
- Revision:
- 0:2faef44cbd2c
Tempsensorprogramm
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
TFuchsbichler | 0:2faef44cbd2c | 1 | #include "mbed.h" |
TFuchsbichler | 0:2faef44cbd2c | 2 | #include "LM75B.h" |
TFuchsbichler | 0:2faef44cbd2c | 3 | |
TFuchsbichler | 0:2faef44cbd2c | 4 | LM75B sensor (p28,p27); |
TFuchsbichler | 0:2faef44cbd2c | 5 | float tempe; |
TFuchsbichler | 0:2faef44cbd2c | 6 | int main() |
TFuchsbichler | 0:2faef44cbd2c | 7 | { |
TFuchsbichler | 0:2faef44cbd2c | 8 | while(1) |
TFuchsbichler | 0:2faef44cbd2c | 9 | { |
TFuchsbichler | 0:2faef44cbd2c | 10 | |
TFuchsbichler | 0:2faef44cbd2c | 11 | printf("Temp: %.2f\n\r",(float)sensor); |
TFuchsbichler | 0:2faef44cbd2c | 12 | wait(0.5); |
TFuchsbichler | 0:2faef44cbd2c | 13 | } |
TFuchsbichler | 0:2faef44cbd2c | 14 | } |
TFuchsbichler | 0:2faef44cbd2c | 15 |