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
Communication/Xbee.h@18:7b187bef18d8, 2015-03-21 (annotated)
- Committer:
- Thierry19
- Date:
- Sat Mar 21 18:13:33 2015 +0000
- Revision:
- 18:7b187bef18d8
- Parent:
- 9:b8503f5ad3bd
Envoie de data dans Noeud_Mobile -> Communication ->Xbee
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pete1801 | 9:b8503f5ad3bd | 1 | #include "mbed.h" |
pete1801 | 9:b8503f5ad3bd | 2 | #include "rtos.h" |
pete1801 | 9:b8503f5ad3bd | 3 | |
pete1801 | 9:b8503f5ad3bd | 4 | typedef char GantsID; |
pete1801 | 9:b8503f5ad3bd | 5 | |
pete1801 | 9:b8503f5ad3bd | 6 | typedef struct { |
pete1801 | 9:b8503f5ad3bd | 7 | GantsID gants; |
pete1801 | 9:b8503f5ad3bd | 8 | char xyz[6]; // donnée accéléromètre. |
pete1801 | 9:b8503f5ad3bd | 9 | char majeur; //Might actually be booleans (to discuss) |
pete1801 | 9:b8503f5ad3bd | 10 | char index; |
pete1801 | 9:b8503f5ad3bd | 11 | char annulaire; |
pete1801 | 9:b8503f5ad3bd | 12 | } Mobile_Vers_Fixe; |
pete1801 | 9:b8503f5ad3bd | 13 | |
pete1801 | 9:b8503f5ad3bd | 14 | struct message { |
pete1801 | 9:b8503f5ad3bd | 15 | Mobile_Vers_Fixe donnees; |
pete1801 | 9:b8503f5ad3bd | 16 | }; |
pete1801 | 9:b8503f5ad3bd | 17 | |
pete1801 | 9:b8503f5ad3bd | 18 | class Xbee |
pete1801 | 9:b8503f5ad3bd | 19 | { |
pete1801 | 9:b8503f5ad3bd | 20 | public : |
pete1801 | 9:b8503f5ad3bd | 21 | Xbee(); |
pete1801 | 9:b8503f5ad3bd | 22 | Xbee(short panId, PinName pinTx, PinName pinRx); |
pete1801 | 9:b8503f5ad3bd | 23 | ~Xbee(); |
pete1801 | 9:b8503f5ad3bd | 24 | |
pete1801 | 9:b8503f5ad3bd | 25 | Mail<message,32> Mailbox; |
Thierry19 | 18:7b187bef18d8 | 26 | void EnvoyerDonnees(char array[], int size); |
pete1801 | 9:b8503f5ad3bd | 27 | void Envoyer(char array[], int size); |
pete1801 | 9:b8503f5ad3bd | 28 | void Recevoir(); |
pete1801 | 9:b8503f5ad3bd | 29 | private: |
pete1801 | 9:b8503f5ad3bd | 30 | Serial* XbeePin; |
pete1801 | 9:b8503f5ad3bd | 31 | short PanId; |
pete1801 | 9:b8503f5ad3bd | 32 | |
pete1801 | 9:b8503f5ad3bd | 33 | void SetPanId(short panId); |
pete1801 | 9:b8503f5ad3bd | 34 | }; |