Applied engineering Team
/
Vjezba-8_Rotate_LCDText
Rotate_LCDText u krug
main.cpp
- Committer:
- tmaltaric
- Date:
- 2015-05-22
- Revision:
- 0:3d442bfc983f
File content as of revision 0:3d442bfc983f:
#include "mbed.h" #include "TextLCD.h" // TextLCD lcd(p19, p20, p21, p22, p23, p24); //rs,e,d0,d1,d2,d3 TextLCD lcd(p19, p20, p21, p22, p23, p24,TextLCD::LCD8x2); const char *message = " ******Maltaric******"; int main() { while (1) { int i; for (i = 0; message[i]; i++) { lcd.locate(0,0); int j, k = i; for (j = 0; j < 20; j++) { if (message[k+j]) { lcd.putc(message[k+j]); } else { lcd.putc(' '); k--; } } wait_ms(450); } } }