For CMPS11 Serial Mode

CMPS11.h

Committer:
alienbernamaihsan
Date:
2017-08-25
Revision:
0:804d45caee8d

File content as of revision 0:804d45caee8d:

#ifndef CMPS11_H
#define CMPS11_H

#include "mbed.h"

class cmps11 
{
    
public:
    cmps11(PinName tx , PinName rx );
    char startCalibration() ;
    char stopCalibration();
    int readCompassAngle16Bit() ;
    void set0degree();
    int readAngle16Bit() ;
    
private:
    Serial _cmps11 ;
    char readstate , buffer[2] , modelast , modenow ;
    int readnow , readlast , sudut , bufferx;
    
};

#endif