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.
main.cpp@3:6854a442d2c6, 2010-10-16 (annotated)
- Committer:
- mpascual
- Date:
- Sat Oct 16 12:42:51 2010 +0000
- Revision:
- 3:6854a442d2c6
- Parent:
- 2:6072f52037b0
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mpascual | 0:14f8cb177d4d | 1 | #include "mbed.h" |
| mpascual | 0:14f8cb177d4d | 2 | #include "TextLCD.h" |
| mpascual | 0:14f8cb177d4d | 3 | |
| mpascual | 2:6072f52037b0 | 4 | TextLCD lcd(p10, p12, p15, p16, p29, p30, TextLCD::LCD20x2); // rs, e, d0-d3 |
| mpascual | 0:14f8cb177d4d | 5 | AnalogIn ain(p20); |
| mpascual | 0:14f8cb177d4d | 6 | |
| mpascual | 0:14f8cb177d4d | 7 | |
| mpascual | 0:14f8cb177d4d | 8 | int main() { |
| mpascual | 2:6072f52037b0 | 9 | //while(1) { |
| mpascual | 3:6854a442d2c6 | 10 | lcd.cls(); |
| mpascual | 3:6854a442d2c6 | 11 | lcd.locate(7, 0); |
| mpascual | 3:6854a442d2c6 | 12 | lcd.printf("Percent is"); |
| mpascual | 3:6854a442d2c6 | 13 | lcd.locate(9, 1); |
| mpascual | 3:6854a442d2c6 | 14 | lcd.printf("%.3f\n",100*ain.read()); |
| mpascual | 3:6854a442d2c6 | 15 | |
| mpascual | 3:6854a442d2c6 | 16 | //lcd.printf("Percent is %.1f\n",100*ain.read()); |
| mpascual | 3:6854a442d2c6 | 17 | //lcd.printf("Voltage is %.3f\n",3.3*ain.read()); |
| mpascual | 2:6072f52037b0 | 18 | } |
| mpascual | 2:6072f52037b0 | 19 | //} |