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.
Dependencies: 4DGL-uLCD-SE mbed
main.cpp@1:9f093ed9a93b, 2018-02-08 (annotated)
- Committer:
- bjs9
- Date:
- Thu Feb 08 03:47:59 2018 +0000
- Revision:
- 1:9f093ed9a93b
- Parent:
- 0:abe7b0c3f382
- Child:
- 2:84b9865dad96
Changes to Lab2_part3;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bjs9 | 0:abe7b0c3f382 | 1 | // uLCD-144-G2 basic text demo program for uLCD-4GL LCD driver library |
bjs9 | 0:abe7b0c3f382 | 2 | // |
bjs9 | 0:abe7b0c3f382 | 3 | #include "mbed.h" |
bjs9 | 0:abe7b0c3f382 | 4 | #include "uLCD_4DGL.h" |
bjs9 | 0:abe7b0c3f382 | 5 | |
bjs9 | 1:9f093ed9a93b | 6 | uLCD_4DGL uLCD(p28,p27,p29); // serial tx, serial rx, reset pin; |
bjs9 | 0:abe7b0c3f382 | 7 | |
bjs9 | 0:abe7b0c3f382 | 8 | int main() |
bjs9 | 0:abe7b0c3f382 | 9 | { |
bjs9 | 0:abe7b0c3f382 | 10 | // basic printf demo = 16 by 18 characters on screen |
bjs9 | 0:abe7b0c3f382 | 11 | uLCD.printf("\nHello uLCD World\n"); //Default Green on black text |
bjs9 | 0:abe7b0c3f382 | 12 | uLCD.printf("\n Starting Demo..."); |
bjs9 | 0:abe7b0c3f382 | 13 | uLCD.text_width(4); //4X size text |
bjs9 | 0:abe7b0c3f382 | 14 | uLCD.text_height(4); |
bjs9 | 0:abe7b0c3f382 | 15 | uLCD.color(RED); |
bjs9 | 0:abe7b0c3f382 | 16 | for (int i=10; i>=0; --i) { |
bjs9 | 0:abe7b0c3f382 | 17 | uLCD.locate(1,2); |
bjs9 | 0:abe7b0c3f382 | 18 | uLCD.printf("%2D",i); |
bjs9 | 0:abe7b0c3f382 | 19 | wait(.5); |
bjs9 | 0:abe7b0c3f382 | 20 | } |
bjs9 | 0:abe7b0c3f382 | 21 | } |