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@9:b8503f5ad3bd, 2015-03-05 (annotated)
- Committer:
- pete1801
- Date:
- Thu Mar 05 21:20:23 2015 +0000
- Revision:
- 9:b8503f5ad3bd
- Child:
- 18:7b187bef18d8
- Child:
- 19:19adf49351b0
- Child:
- 20:96280625532c
Ajout de la classe qui imprime dans la console.; Ajout de la classe de 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; |
pete1801 | 9:b8503f5ad3bd | 26 | |
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 | }; |