Patrice HAESAERT
/
XBEE_emeteur
xbee e
Revision 0:b2c100cfa6c9, committed 2021-10-20
- Comitter:
- pathae
- Date:
- Wed Oct 20 17:18:34 2021 +0000
- Commit message:
- XBEE emission
Changed in this revision
emet_xbee.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r b2c100cfa6c9 emet_xbee.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emet_xbee.cpp Wed Oct 20 17:18:34 2021 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" + +Serial xbee(PA_9,PA_10); //Initalise xbee_lib +Serial pc(USBTX, USBRX); //Initalise PC serial comms +int temperature = 82; +int pression = 1234; +int vit_rot = 5678; +DigitalOut myled(LED2); +int main() +{ + while(1) + { + xbee.printf ("$MOTEUR,%d,%d,%d*",temperature,pression,vit_rot); + //pc.printf("$MOTEUR,%d,%d,%d*\n\r",temperature,pression,vit_rot); + wait(1); + myled=!myled; + } +}
diff -r 000000000000 -r b2c100cfa6c9 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 20 17:18:34 2021 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ed44a420e5c \ No newline at end of file