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.
Dependencies: MultiSerial mbed
main.cpp
00001 //Easy Controller Used Xbee 00002 00003 #include "mbed.h" 00004 #include "MultiSerial.h" 00005 00006 #define KEYCODE 0xAA 00007 00008 MultiSerial xbee(p28, p27,write); 00009 Serial pc(USBTX,USBRX); 00010 00011 BusIn sw(p5,p6,p7,p8,p9,p10,p11,p12); 00012 00013 BusOut check(LED1,LED2,LED3,LED4); 00014 00015 uint8_t value[2]={0}; 00016 uint8_t convert; 00017 00018 int main(){ 00019 00020 xbee.write_data(value,KEYCODE); 00021 00022 for(;;){ 00023 00024 sw.mode(PullUp); 00025 00026 convert = ~sw; 00027 00028 value[0] = convert&0x0F; 00029 value[1] = (convert&0xF0)>>4; 00030 00031 check = value[0]; 00032 00033 } 00034 }
Generated on Sun Jul 24 2022 18:00:42 by
1.7.2