An XBee ZB Coordinator on a Nucleo Board controls LEDs on the other XBee ZB device.
Please refer to the following site for the details:
- http://developer.mbed.org/users/bokunimowakaru/code/xbee/wiki/Homepage (English)
- http://www.geocities.jp/bokunimowakaru/diy/xbee/xbee-nucleo.html (Japanese)
Revision 5:5cc827c15cf8, committed 2014-10-04
- Comitter:
- bokunimowakaru
- Date:
- Sat Oct 04 02:00:07 2014 +0000
- Parent:
- 4:4ea0b1d60d25
- Child:
- 6:61828d2025f1
- Commit message:
- XBee lib's serial setting code on xbee.cpp is moved to 4th line on it.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
xbee.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 26 13:01:22 2014 +0000 +++ b/main.cpp Sat Oct 04 02:00:07 2014 +0000 @@ -1,6 +1,13 @@ /********************************************************************* サンプルアプリ1 リモート先のLEDをON/OFFする。 +Sample Code 1 LED +An XBee ZB Coordinator on a Nucleo Board controls LEDs on the other +XBee ZB device. +When you will use this anything other than Nucleo microcomputer board, +please change the 4th line of xbee/xbee.cpp: +RawSerial _xbee_serial(SERIAL_TX, SERIAL_RX); + 本ソースリストおよびソフトウェアは、ライセンスフリーです。 利用、編集、再配布等が自由に行えますが、著作権表示の改変は禁止します。 @@ -17,15 +24,14 @@ int main(){ // お手持ちのXBee子機(リモート先)アドレスに変更して下さい ↓ + // Please set MAC Address to access your remote XBee device. byte dev_gpio[] = {0x00,0x13,0xA2,0x00,0x40,0x30,0xC1,0x6F}; - // 初期化処理 myled = 1; // NUCLEOのLEDをHレベル(3.3V)へ xbee_init( 0 ); // XBee用COMポートの初期化 xbee_atnj( 0xFF ); // デバイスの参加を受け入れる myled = 0; // NUCLEOのLEDをHレベル(3.3V)へ - // メイン処理 while(1){ // 永久に受信する myled = 1; // NUCLEOのLEDをHレベル(3.3V)へ xbee_gpo(dev_gpio,11,1); // GPOポート11をHレベル(3.3V)へ
--- a/xbee.lib Fri Sep 26 13:01:22 2014 +0000 +++ b/xbee.lib Sat Oct 04 02:00:07 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/bokunimowakaru/code/xbee/#4d3b028779c9 +http://mbed.org/users/bokunimowakaru/code/xbee/#045e7cdca173