XBee to LCD

Dependencies:   TextLCD mbed

Fork of XBEE_LCD by toshio masuda

main.cpp

Committer:
MasudaToshio
Date:
2013-05-23
Revision:
1:7345f104ff5c
Parent:
0:48b9e99fafc8

File content as of revision 1:7345f104ff5c:

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

Serial xbee(p13, p14); // tx, rx
TextLCD lcd(p24, p26, p27, p28, p29, p30);

/////////////////////////////////////////////////////
//      main
/////////////////////////////////////////////////////
int main(void) {
        char pc_in[32] ;
    lcd.cls() ;
    lcd.printf( "wait xbee input" ) ;

    while(1) {
        if(xbee.readable()) {
            pc_in[0] = xbee.getc() ;
            if( pc_in[0] == 0x063 ){
                lcd.cls();
            }else{
                lcd.printf( pc_in );
            }
        }
    }
    return 0;
}