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@0:2046e5bfc62d, 2014-12-25 (annotated)
- Committer:
- okini3939
- Date:
- Thu Dec 25 15:28:38 2014 +0000
- Revision:
- 0:2046e5bfc62d
1st build;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| okini3939 | 0:2046e5bfc62d | 1 | #include "mbed.h" |
| okini3939 | 0:2046e5bfc62d | 2 | #include "PCF2119.h" |
| okini3939 | 0:2046e5bfc62d | 3 | |
| okini3939 | 0:2046e5bfc62d | 4 | DigitalOut myled(LED1); |
| okini3939 | 0:2046e5bfc62d | 5 | |
| okini3939 | 0:2046e5bfc62d | 6 | I2C i2c(p9, p10); |
| okini3939 | 0:2046e5bfc62d | 7 | PCF2119 lcd(i2c, p11); |
| okini3939 | 0:2046e5bfc62d | 8 | //PCF2119 lcd(p9, p10, p11); |
| okini3939 | 0:2046e5bfc62d | 9 | |
| okini3939 | 0:2046e5bfc62d | 10 | int main() { |
| okini3939 | 0:2046e5bfc62d | 11 | int i = 0; |
| okini3939 | 0:2046e5bfc62d | 12 | |
| okini3939 | 0:2046e5bfc62d | 13 | lcd.cls(); |
| okini3939 | 0:2046e5bfc62d | 14 | lcd.printf("Hello World"); |
| okini3939 | 0:2046e5bfc62d | 15 | |
| okini3939 | 0:2046e5bfc62d | 16 | while(1) { |
| okini3939 | 0:2046e5bfc62d | 17 | lcd.locate(0, 1); |
| okini3939 | 0:2046e5bfc62d | 18 | lcd.printf("%d", i); |
| okini3939 | 0:2046e5bfc62d | 19 | i ++; |
| okini3939 | 0:2046e5bfc62d | 20 | myled = !myled; |
| okini3939 | 0:2046e5bfc62d | 21 | wait(0.5); |
| okini3939 | 0:2046e5bfc62d | 22 | } |
| okini3939 | 0:2046e5bfc62d | 23 | } |
PCF2119x