CMPS03 Compass library with only PWM support. I2C support will be added shortly, while it will arrive, you may use MBED component library if you wish to use CMPS03 I2C interface

Dependents:   TestBoussole FRC_2018 0hackton_08_06_18 lib_FRC_2019 ... more

Files at this revision

API Documentation at this revision

Comitter:
gvaquette
Date:
Wed Oct 23 11:17:17 2019 +0000
Parent:
4:ab9eadf7537a
Commit message:
translation : CMPS03;

Changed in this revision

CMPS03.cpp Show annotated file Show diff for this revision Revisions of this file
CMPS03.h Show annotated file Show diff for this revision Revisions of this file
diff -r ab9eadf7537a -r 7bfdf8ff9c5e CMPS03.cpp
--- a/CMPS03.cpp	Tue Jun 05 13:53:47 2018 +0000
+++ b/CMPS03.cpp	Wed Oct 23 11:17:17 2019 +0000
@@ -1,10 +1,10 @@
 #include "CMPS03.h"
 
-CMPS03::CMPS03(PinName pwm) : _boussole(pwm)
+CMPS03::CMPS03(PinName pwm) : _compass(pwm)
 {
-    _boussole.rise(callback(this, &CMPS03::rise));
-    _boussole.fall(callback(this, &CMPS03::fall));
-    _boussole.enable_irq();
+    _compass.rise(callback(this, &CMPS03::rise));
+    _compass.fall(callback(this, &CMPS03::fall));
+    _compass.enable_irq();
     _tim.start();
 }
 
diff -r ab9eadf7537a -r 7bfdf8ff9c5e CMPS03.h
--- a/CMPS03.h	Tue Jun 05 13:53:47 2018 +0000
+++ b/CMPS03.h	Wed Oct 23 11:17:17 2019 +0000
@@ -51,7 +51,7 @@
     long    _startTime, _stopTime;
     double  _pwmBearing;
 
-    InterruptIn _boussole;
+    InterruptIn _compass;
     Timer _tim;
 
     void rise();