sender backup

Dependencies:   mbed

Fork of XBee_write by Alex Louden

main.cpp

Committer:
alex89
Date:
2010-06-04
Revision:
0:74b4b9fc9480
Child:
1:bd05bf8bbe0a

File content as of revision 0:74b4b9fc9480:

#include "main.h"

Serial xbee1(p9, p10);
DigitalOut rst1(p11);

DigitalOut myled(LED1);
DigitalOut myled2(LED2);

int main() {
    rst1 = 0;   //Set reset pin to 0
    myled = 0;
    myled2= 0;
    wait_ms(1);
    rst1 = 1;   //Set reset pin to 1
    wait_ms(1);

    while (1) {
        int a = getKeyNum();
        
        if(a!=-1){
            myled2 = 1;
            xbee1.putc(a); //XBee write
            myled2 = 0;
        }
    }
}