For CMPS11 Serial Mode

Revision:
0:804d45caee8d
diff -r 000000000000 -r 804d45caee8d CMPS11.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CMPS11.h	Fri Aug 25 08:02:16 2017 +0000
@@ -0,0 +1,24 @@
+#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