![](/media/cache/profiles/09bd2862fe3035ad3223816b439045e3.50x50_q85.jpg)
Text LCD "Hello"
Fork of Text_LCD_Hello by
main.cpp@0:41c8fde7347e, 2013-05-14 (annotated)
- Committer:
- MasudaToshio
- Date:
- Tue May 14 10:38:01 2013 +0000
- Revision:
- 0:41c8fde7347e
Test LCD "Hello"
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MasudaToshio | 0:41c8fde7347e | 1 | #include "mbed.h" |
MasudaToshio | 0:41c8fde7347e | 2 | #include "TextLCD.h" |
MasudaToshio | 0:41c8fde7347e | 3 | |
MasudaToshio | 0:41c8fde7347e | 4 | TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d0-d3 |
MasudaToshio | 0:41c8fde7347e | 5 | // In BoardOrange, the "RW" signal is unnecessary. |
MasudaToshio | 0:41c8fde7347e | 6 | |
MasudaToshio | 0:41c8fde7347e | 7 | ///////////////////////////////////////////////////// |
MasudaToshio | 0:41c8fde7347e | 8 | // main |
MasudaToshio | 0:41c8fde7347e | 9 | ///////////////////////////////////////////////////// |
MasudaToshio | 0:41c8fde7347e | 10 | int main(void) { |
MasudaToshio | 0:41c8fde7347e | 11 | |
MasudaToshio | 0:41c8fde7347e | 12 | lcd.cls(); |
MasudaToshio | 0:41c8fde7347e | 13 | |
MasudaToshio | 0:41c8fde7347e | 14 | while(1) { |
MasudaToshio | 0:41c8fde7347e | 15 | |
MasudaToshio | 0:41c8fde7347e | 16 | lcd.cls(); |
MasudaToshio | 0:41c8fde7347e | 17 | wait(1); |
MasudaToshio | 0:41c8fde7347e | 18 | |
MasudaToshio | 0:41c8fde7347e | 19 | lcd.locate(0,0); |
MasudaToshio | 0:41c8fde7347e | 20 | lcd.printf("Hello"); |
MasudaToshio | 0:41c8fde7347e | 21 | wait(1); |
MasudaToshio | 0:41c8fde7347e | 22 | |
MasudaToshio | 0:41c8fde7347e | 23 | lcd.locate(0,1); |
MasudaToshio | 0:41c8fde7347e | 24 | lcd.printf("mbed"); |
MasudaToshio | 0:41c8fde7347e | 25 | wait(1); |
MasudaToshio | 0:41c8fde7347e | 26 | } |
MasudaToshio | 0:41c8fde7347e | 27 | |
MasudaToshio | 0:41c8fde7347e | 28 | return 0; |
MasudaToshio | 0:41c8fde7347e | 29 | } |