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
Diff: CMPS03.cpp
- Revision:
- 5:7bfdf8ff9c5e
- Parent:
- 3:3e9586433ce5
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(); }