Dependencies: max32630fthr Adafruit_FeatherOLED_2020 USBDevice
Diff: source/main.cpp
- Revision:
- 3:bb52b351d6f5
- Parent:
- 2:786c61e6532a
- Child:
- 4:727e58d27bf1
--- a/source/main.cpp Thu Feb 13 15:40:36 2020 +0000 +++ b/source/main.cpp Thu Feb 13 16:35:33 2020 +0000 @@ -43,6 +43,9 @@ float f_temp; uint8_t hrmCounter; +I2C i2c(P3_4, P3_5); // SDA, SCL + +Adafruit_SSD1306_I2c oled(i2c); //declare the oled display and its port connection type (I2C) #ifdef TARGET_MAX32630FTHR PwmOut led1(LED_RED); //initializes the pwm output that connects to the on board LED @@ -52,6 +55,7 @@ const static char DEVICE_NAME[] = "HRM"; static const uint16_t uuid16_list[] = {GattService::UUID_HEART_RATE_SERVICE}; + static HeartRateService *hrServicePtr; static EventQueue eventQueue(/* event count */ 16 * EVENTS_EVENT_SIZE); @@ -237,10 +241,16 @@ eventQueue.dispatch_forever(); } +void OLEDInitialise(){ + oled.clearDisplay(); + oled.setTextCursor(); + oled.setTextSize(); +} int main() { HRMSensorInitialise(); + OLEDInitialise(); while(1)