SLIM BEN OTHMAN / Mbed 2 deprecated LCD_test

Dependencies:   TextLCD mbed

Fork of LCD_test by Rain Ashford

main.cpp

Committer:
Rainycat
Date:
2010-04-05
Revision:
0:2e3ae6cbbe60
Child:
1:d8bbe6c6a563

File content as of revision 0:2e3ae6cbbe60:



#include "mbed.h"
#include "TextLCD.h"

TextLCD lcd(p24, p25, p26, p27, p28, p29, p30); // rs, rw, e, d0, d1, d2, d3

const char *message = "                Hello there mousie!";

int main() {
    //lcd.printf("Yay! Woo! from  Rainycat!");
    while (1) {
    int i;
    for (i = 0; message[i]; i++) {
        lcd.locate(0,0);
        int j, k = i;
        for (j = 0; j < 15; j++) {
            if (message[k+j]) {
                lcd.putc(message[k+j]);
            } else {
                lcd.putc(' ');
                k--;
            }
        }
        wait_ms(450);
    }    
    }
}