たけし みわ
/
y_XBeeTest_5_write
Revision 0:e4db66e00170, committed 2012-06-17
- Comitter:
- esmiwa
- Date:
- Sun Jun 17 11:41:45 2012 +0000
- Commit message:
Changed in this revision
diff -r 000000000000 -r e4db66e00170 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Sun Jun 17 11:41:45 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/davervw/code/TextLCD/#c5318c74f1a9
diff -r 000000000000 -r e4db66e00170 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jun 17 11:41:45 2012 +0000 @@ -0,0 +1,41 @@ +/* XBee Test_5 */ +/*Mbed_me - 40704B01 ROUTER AT*/ +/*Mbed_you- 406F4E57 COODINATOR AT*/ + +#include "mbed.h" +#include "TextLCD.h" +Serial xbee(p13, p14); +TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 +BusOut led(LED1,LED2,LED3,LED4); +InterruptIn tact(p22); + +int main() { + int c100=0,a100=0; + int c10=0,a10=0; + int c=0; + int counter=0; + led = 0; + lcd.printf("Hello! conter"); + while (1) { + if (xbee.writeable()) { + led=1; + c100=counter/100;a100=counter%100; + c10=a100/10;a10=a100%10; + c=a10; + xbee.putc(c100); + //wait_ms(10); + xbee.putc(c10); + //wait_ms(10); + xbee.putc(c); + //wait_ms(10); + //xbee.printf("%d",counter); + lcd.locate(0,1);lcd.printf("%d%d%d",c100,c10,c); + wait(1); + led=0; + counter++; + if(counter>=100)break; + } + } + lcd.printf("end"); + xbee.printf("%c%c%c",'e','n','d'); +} \ No newline at end of file
diff -r 000000000000 -r e4db66e00170 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Jun 17 11:41:45 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479