Projecte final de Sistemes Encastats
Dependencies: Hc05 RawSerialPc mbed-rtos mbed
Diff: main.cpp
- Revision:
- 2:1ac2d1debc92
- Parent:
- 1:c603de57c8b6
- Child:
- 3:4a598ab10e87
--- a/main.cpp Wed Dec 16 16:06:25 2015 +0000 +++ b/main.cpp Wed Dec 16 18:09:25 2015 +0000 @@ -5,6 +5,8 @@ // ---- NO TOCAR DESDE AQUI ---- // ----------------------------- +//0, 60, 120, 180 i en negatiu + #define longString 128 //longString es la longitud màxima del string class Pc : public RawSerial { @@ -112,6 +114,8 @@ vel = atoi(svel); ang = atoi(sang); } + if ((strLlegit[0] == 'm') && (strLlegit[1] == 'o') && (strLlegit[2] == 'd') && (strLlegit[3] == 'e') && (strLlegit[5] == 'a') && (strLlegit[6] == 'u') && (strLlegit[7] == 't') && (strLlegit[8] == 'o')) + mode = 3; }; int getMode(){return mode;}; @@ -131,7 +135,7 @@ // ---------------------------- Pc pc(USBTX, USBRX); //Per provar si funciona, no cal al programa -Hc05 bt(D8, D2); //Crea l'objecte bt, connectat als pins D8 i D2 (és la connexió sèrie BT) +Hc05 bt(D8, D2); //Crea l'objecte bt, connectat als pins D8 (TX) i D2 (RX) (és la connexió sèrie BT) char prova[longString] = "hola"; //Per provar si funciona, no cal al programa