Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 /* XBee Test_5 */ 00002 /*Mbed_me - 40704B01 ROUTER AT*/ 00003 /*Mbed_you- 406F4E57 COODINATOR AT*/ 00004 00005 #include "mbed.h" 00006 #include "TextLCD.h" 00007 Serial xbee(p13, p14); 00008 TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 00009 BusOut led(LED1,LED2,LED3,LED4); 00010 InterruptIn tact(p22); 00011 00012 int main() { 00013 int c100=0,a100=0; 00014 int c10=0,a10=0; 00015 int c=0; 00016 int counter=0; 00017 led = 0; 00018 lcd.printf("Hello! conter"); 00019 while (1) { 00020 if (xbee.writeable()) { 00021 led=1; 00022 c100=counter/100;a100=counter%100; 00023 c10=a100/10;a10=a100%10; 00024 c=a10; 00025 xbee.putc(c100); 00026 //wait_ms(10); 00027 xbee.putc(c10); 00028 //wait_ms(10); 00029 xbee.putc(c); 00030 //wait_ms(10); 00031 //xbee.printf("%d",counter); 00032 lcd.locate(0,1);lcd.printf("%d%d%d",c100,c10,c); 00033 wait(1); 00034 led=0; 00035 counter++; 00036 if(counter>=100)break; 00037 } 00038 } 00039 lcd.printf("end"); 00040 xbee.printf("%c%c%c",'e','n','d'); 00041 }
Generated on Thu Jul 14 2022 19:47:24 by
1.7.2