Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:e4a32b4163f2
- Parent:
- 0:7b5d37ca532f
- Child:
- 2:17d5a74fc2c4
--- a/main.cpp Wed Oct 09 09:38:09 2019 +0000 +++ b/main.cpp Wed Oct 09 09:41:54 2019 +0000 @@ -1,10 +1,10 @@ #include "mbed.h" -//#include "BMP280.h" -//#include "LIS2DH.h" +#include "BMP280.h" +#include "LIS2DH.h" #include "MAX14720.h" #include "MAX30001.h" -//#include "MAX30101.h" -//#include "MAX30205.h" +#include "MAX30101.h" +#include "MAX30205.h" #include "System.h" #include "USBSerial.h" @@ -16,9 +16,9 @@ #define LIS2DH_I2C_SLAVE_ADDR (0x32) #define MAX14720_I2C_SLAVE_ADDR (0x54) #define MAX30101_I2C_SLAVE_ADDR (0xAE) -//#define MAX30205_I2C_SLAVE_ADDR_BOTTOM (0x90) -//#define MAX30205_I2C_SLAVE_ADDR_TOP (0x92) -//#define BMP280_I2C_SLAVE_ADDR (0xEC) +#define MAX30205_I2C_SLAVE_ADDR_BOTTOM (0x90) +#define MAX30205_I2C_SLAVE_ADDR_TOP (0x92) +#define BMP280_I2C_SLAVE_ADDR (0xEC) // Settings for ECG Initialization #define En_ecg 0x01 @@ -76,8 +76,8 @@ //InterruptIn max30101_Interrupt(P4_0); // Accelerometer -LIS2DH lis2dh(&i2c2, LIS2DH_I2C_SLAVE_ADDR); -InterruptIn lis2dh_Interrupt(P4_7); +//LIS2DH lis2dh(&i2c2, LIS2DH_I2C_SLAVE_ADDR); +//InterruptIn lis2dh_Interrupt(P4_7); // Barometric Pressure Sensor //BMP280 bmp280_pres(&i2c1, BMP280_I2C_SLAVE_ADDR); @@ -162,12 +162,7 @@ //max30101.onInterrupt(&MAX30101_OnInterrupt); //max30101.onDataAvailable(&StreamPacketUint32_ex); //max30101_Interrupt.fall(&MAX30101MidIntHandler); - - // LIS2DH initialize interrupt - lis2dh.onInterrupt(&MAX30101_OnInterrupt); - lis2dh.onDataAvailable(&StreamPacketUint32_ex); - lis2dh_Interrupt.fall(&MAX30101MidIntHandler); - + // Initialise the BMP280 //bmp280_pres.init(BMP280::OVERSAMPLING_X16_P, BMP280::OVERSAMPLING_X2_T, BMP280::FILT_4, BMP280::NORMAL_MODE, BMP280::T_62_5);