test de premier push
Dependencies: WakeUp mbed EPD_GDE021A1
Revision 27:221ee2a91664, committed 2016-11-25
- Comitter:
- mathieusab
- Date:
- Fri Nov 25 06:56:49 2016 +0000
- Parent:
- 26:8cf0b34be9c6
- Commit message:
- Appel depuis le main de la fonction send(); Faut verifier si la commande est bonne dans le send.cpp
Changed in this revision
Sources/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
Sources/send.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 8cf0b34be9c6 -r 221ee2a91664 Sources/main.cpp --- a/Sources/main.cpp Thu Nov 24 18:26:47 2016 +0000 +++ b/Sources/main.cpp Fri Nov 25 06:56:49 2016 +0000 @@ -11,6 +11,7 @@ #include "../Headers/constants.h" #include "../Headers/ecran.h" #include "../Headers/poids.h" +#include "../Headers/send.h" #include "../Headers/refreshScreen.h" #include "../Headers/standby.h" @@ -21,6 +22,10 @@ State state = Start; // état de base : start int poidsRuche; +int poids = 17; +int temp = 21; +int hum = 92; + int main () { //Ecran::print; @@ -37,6 +42,7 @@ //TODO SI jour, Etat suivant = DeepSleepShort //TODO SI nuit, Etat suivant = DeepSleepLong + state = Send; break; case DeepSleepShort: pc.printf("State DeepSleepShort\n"); @@ -64,11 +70,12 @@ case Send: pc.printf("State Send\n"); //TODO Ajouter appel à send(...) - + send(poids,temp,hum); //TODO Test jour ou nuit //TODO SI jour, Etat suivant = DeepSleepShort //TODO SI nuit, Etat suivant = DeepSleepLong + state = Start; break; default: pc.printf("State Error\n");
diff -r 8cf0b34be9c6 -r 221ee2a91664 Sources/send.cpp --- a/Sources/send.cpp Thu Nov 24 18:26:47 2016 +0000 +++ b/Sources/send.cpp Fri Nov 25 06:56:49 2016 +0000 @@ -1,5 +1,5 @@ #include "mbed.h" - +#include "send.h" Serial sigfox(PA_9,PA_10); // tx, rx @@ -12,7 +12,8 @@ { //sigfox.printf("AT$SS=%i/cr/lf",i); - sigfox.printf("AT$SS=0%X 0%X 0%X %X %X \n",poids, temp, hum); + sigfox.printf("AT$SS=0%X 0%X 0%X 00\r\n",poids, temp, hum); + //sigfox.printf("AT$SS=0%X 0%X 0%X %X %X \r\n",poids, temp, hum); // LEDs ON led0 = 1;