Nora Vazbyte
/
99Problems-BLEAint1
app critics will say it's money, cash, toes
Diff: source/main.cpp
- Revision:
- 2:1957a4985d6e
- Parent:
- 1:df8884d38960
- Child:
- 3:a33709dad06c
--- a/source/main.cpp Sun Oct 28 12:51:59 2018 +0000 +++ b/source/main.cpp Sun Oct 28 13:45:26 2018 +0000 @@ -21,20 +21,6 @@ #include "ble/Gap.h" #include "ble/services/HeartRateService.h" -#define Kp 2.0f * 5.0f // these are the free parameters in the Mahony filter and fusion scheme, Kp for proportional feedback, Ki for integral -#define Ki 0.0f - -//****************************************************************************** -MPU9250::MPU9250(PinName sda, PinName scl) -{ - i2c_ = new I2C(sda, scl); - i2c_->frequency(400000); -} - -//****************************************************************************** -MPU9250::MPU9250(I2C *i2c):i2c_(i2c){} - -//****************************************************************************** DigitalOut led1(LED1, 1); @@ -51,17 +37,12 @@ BLE::Instance().gap().startAdvertising(); } - - - - - +void updateSensorValue() { +// hrmCounter++; +// if (hrmCounter > 175) { +// hrmCounter = 100; +// } -void updateSensorValue() { - hrmCounter++; - if (hrmCounter > 175) { - hrmCounter = 100; - } hrService->updateHeartRate(hrmCounter); } @@ -138,6 +119,8 @@ int main() { + MPU9250 mpu = MPU9250(p26, p27); + mpu.initMPU9250(); eventQueue.call_every(500, blinkCallback); BLE &ble = BLE::Instance();