Llibreria per fer servir un HC-06 o HC-05 en mode esclau. És compatible amb les llibreries RTOS de mbed.

Dependents:   projecte_v4_rtos ProjecteRobotFinal

Hc05.h

Committer:
jcabello7
Date:
2015-12-21
Revision:
1:cd73654d13ed
Parent:
0:acddf8d6d0cb
Child:
2:298c9cc5af48

File content as of revision 1:cd73654d13ed:

#ifndef MBED_HC05_H
#define MBED_HC05_H

#include "mbed.h"

class Hc05 : public RawSerial {
    private:
        int mode, vel, ang;
        float m1, m2, m3, x, y;
        Timer timer;
        char strLlegit[longString]; 
    public:
        Hc05(PinName tx, PinName rx);
        ~Hc05();
        void iniString();
        void enviaString(char* str);
        bool llegirString(); 
        void tractaString();
        int getMode();
        int getVel();
        int getAng();
        void getStringLlegit(char* str);
        void comprovaConnexio();
        int getTimer();
        //Calculs
        void calculaMotors();
        float getM1();
        float getM2();
        float getM3();
        float getX();
        float getY();
};

#endif