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.
Fork of Repo_Noeud_Mobile by
Diff: Communication/Xbee.cpp
- Revision:
- 55:adde1b6081b8
- Parent:
- 52:10fb8ca4ed03
- Child:
- 56:6af8f2c9ddbe
--- a/Communication/Xbee.cpp Sat Apr 11 22:58:48 2015 +0000 +++ b/Communication/Xbee.cpp Sun Apr 12 00:39:07 2015 +0000 @@ -26,8 +26,10 @@ { for(int i = 0; i < size; i++) { XbeePin->putc(array[i]); - x_pc.printf("Send : %X \r\n", array[i]); + x_pc.printf("Send array: %X \r\n", array[i]); + } + x_pc.printf("Send Complete! \r\n"); } //function that generates the Transmit Request frame @@ -68,6 +70,7 @@ for(int i = 17; i < size-1; i++) { //data command[i] = data[i-17]; //data + x_pc.printf("Send : %d \r\n", data[i-17]); sum += command[i]; //keep calculating for checksum } @@ -87,11 +90,11 @@ data[4] = mvf.accelData.y & 0x00FF; data[5] = mvf.accelData.z >> 8; data[6] = mvf.accelData.z & 0x00FF; - x_pc.printf("\r\nClass Accel x: %d", mvf.accelData.x); + x_pc.printf("Class Accel x: %d \r\n", mvf.accelData.x); mvf.flexSensor.index == 1 ? data[7] = 0x04 : data[7] = 0; mvf.flexSensor.majeur == 1 ? data[7] += 0x02 : data[7] += 0; mvf.flexSensor.annulaire == 1 ? data[7] += 0x01 : data[7] += 0; - + EnvoyerDonnees(data, 8); }