![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
main.cpp@0:737775c5fc00, 2012-02-27 (annotated)
- Committer:
- takahashim
- Date:
- Mon Feb 27 06:35:31 2012 +0000
- Revision:
- 0:737775c5fc00
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takahashim | 0:737775c5fc00 | 1 | #include "mbed.h" |
takahashim | 0:737775c5fc00 | 2 | #include "TextLCD.h" |
takahashim | 0:737775c5fc00 | 3 | |
takahashim | 0:737775c5fc00 | 4 | AnalogIn ain(p15); |
takahashim | 0:737775c5fc00 | 5 | DigitalOut myled(LED1); |
takahashim | 0:737775c5fc00 | 6 | TextLCD lcd(p24, p26, p27, p28, p29, p30); |
takahashim | 0:737775c5fc00 | 7 | float temp; |
takahashim | 0:737775c5fc00 | 8 | |
takahashim | 0:737775c5fc00 | 9 | int main() { |
takahashim | 0:737775c5fc00 | 10 | while(1) { |
takahashim | 0:737775c5fc00 | 11 | temp = ain * 3.3 * 100; |
takahashim | 0:737775c5fc00 | 12 | lcd.cls(); |
takahashim | 0:737775c5fc00 | 13 | lcd.locate(0,0); |
takahashim | 0:737775c5fc00 | 14 | lcd.printf("temp: %4.2f",temp); |
takahashim | 0:737775c5fc00 | 15 | wait(1); |
takahashim | 0:737775c5fc00 | 16 | } |
takahashim | 0:737775c5fc00 | 17 | } |