BLOG# 4 - BPM Uno – System Implementation and Testing. A Patient Beats Per Minute Heart Rate Monitor This blog is part of a blog series for the Summer of Sensors -- Under Pressure Design Challenge. I will describe the implementation and testing phase of my prototype. I will be unit testing the 2 main components (SSD1306, MIKROE-2000)
First, do a test on each component, using the wiring directly to the Uno headers. Run each test separately Using a test sketch for each one to prove that they are functioning properly
Second, stacking the 2 Shields as described in my Design. Then wire up the LCD display as described in my design in blog#3 in this series. Now run the OLED_test sketch. This will prove, that the connections, of the stacked shields and my soldering job on the MikroE shield is OK.
Third, connect both components to the MIKROE shield as described in my design. Then run a sketch that test the MiKROE-2000 and the OLED at the same time.
Table of Contents
- Unit Testing
- TEST-1 -- Both components individually wired to the UNO
- TEST-2-- Connecting OLED and MIKROE-1581 to the Grove UNO Base Shield
- TEST-3-- Stacking the UNO Click Shield and connecting the Heart Rate Click and the OLED Display
- TEST-4-- Stacking the 2 Shields on the UNO and Using the Grove-LCD + MIKROE-2000
- Summary & Conclusions
- REFERENCES
Unit Testing
TEST-1 -- Both components individually wired to the UNO
SSD1306 I2C OLED Display
FIRMWARE CODE
- A Firmware sketch to test the OLED Display. This sketch will simply increment a counter and display the results on the OLED screen.
- I connected 4 jumper wires to the Arduino Uno. The Display is mounted on a breadboard. The jumper wires are:
- RED - UNO 3.3v to VCC on OLED
- BLACK - UNO GND to GND OLED
- BLUE UNO SCL to SCL OLED
- GREEN UNO SDA to SDA OLED
FIRMWARE NAME: OLED_Test.ino
CODE:
// Include Wire Library for I2C #include <Wire.h> // Include Adafruit Graphics & OLED libraries #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // Reset pin not used but needed for library // works on NANO //#define OLED_RESET 4 //Adafruit_SSD1306 display(OLED_RESET); // CODE for MKR WAN 1300 #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); int count; void setup() { // Start Wire library for I2C Wire.begin(); // initialize OLED with I2C addr 0x3C display.begin(SSD1306_SWITCHCAPVCC, 0x3C); count=1; } void displayValues(int v){ // Delay to allow sensor to stabalize delay(500); // Clear the display display.clearDisplay(); //Set the color - always use white despite actual display color display.setTextColor(WHITE); //Set the font size display.setTextSize(1); //Set the cursor coordinates display.setCursor(25,0); display.print("COUNTER"); display.setCursor(33,12); display.setTextSize(3); display.print(v); } void loop() { ++count; displayValues(count); display.display(); }
VIDEO of the Test running.
RESULTS
This worked the first time I ran it. I had used this test on another project with a NANO IoT 33, that utilized this OLED display. I was happy to see that the wiring connections worked.
MIKROE-2000 Heart Rate Click
I connected 4 jumper wires to the Arduino Uno on one end. On the other end, I connected the female connector to the MIKROE-2000 pins as shown below.
The jumper wires are:
- RED - UNO 3.3v TO 3.3v pin on the MIKROE-2000
- BLACK - UNO GND TO GND pin on the MIKROE-2000
- BLUE UNO SCL TO SCL pin on the MIKROE-2000
- GREEN UNO SDA TO SDA pin on the MIKROE-2000
To use this click, Luckily, I found an Arduino supported library on GitHub. The Arduino-MAX30100 has a few examples, once you clone it to zip and insert the library as described in my blog MIKROE-2000 Heart Rate Click , you should find the following sample examples under the examples menu in the Arduino IDE.
I used the MAX30100_Tester example to make sure my connections to the UNO were working. The test ran with flying colors.
FIRMWARE CODE
Firmware sketch that test the MIKROE-2000.
This example can be used to test connectivity and operation of the sensor. check the README file on the repo's root for a troubleshooting guide in case any of the tests running fail
FIRMWARE NAME: MAX30100_Tester.ino
CODE:
/* Arduino-MAX30100 oximetry / heart rate integrated sensor library Copyright (C) 2017 OXullo Intersecans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ // This example can be used to test connectivity and operation of the sensor // check the README file on the repo's root for a troubleshooting guide in case // any of the tests running fail #include <Wire.h> #include "MAX30100.h" MAX30100 sensor; void setup() { Serial.begin(115200); Serial.print("Initializing MAX30100.."); if (!sensor.begin()) { Serial.print("FAILED: "); uint8_t partId = sensor.getPartId(); if (partId == 0xff) { Serial.println("I2C error"); } else { Serial.print("wrong part ID 0x"); Serial.print(partId, HEX); Serial.print(" (expected: 0x"); Serial.println(EXPECTED_PART_ID, HEX); } // Stop here for(;;); } else { Serial.println("Success"); } Serial.print("Enabling HR/SPO2 mode.."); sensor.setMode(MAX30100_MODE_SPO2_HR); Serial.println("done."); Serial.print("Configuring LEDs biases to 50mA.."); sensor.setLedsCurrent(MAX30100_LED_CURR_50MA, MAX30100_LED_CURR_50MA); Serial.println("done."); delay(1000); Serial.print("Lowering the current to 7.6mA.."); sensor.setLedsCurrent(MAX30100_LED_CURR_7_6MA, MAX30100_LED_CURR_7_6MA); Serial.println("done."); delay(1000); Serial.print("Shutting down.."); sensor.shutdown(); Serial.println("done."); delay(1000); Serial.print("Resuming normal operation.."); sensor.resume(); delay(500); Serial.println("done."); uint32_t tsTempSampStart = millis(); Serial.print("Sampling die temperature.."); sensor.startTemperatureSampling(); while(!sensor.isTemperatureReady()) { if (millis() - tsTempSampStart > 1000) { Serial.println("ERROR: timeout"); // Stop here for(;;); } } float temperature = sensor.retrieveTemperature(); Serial.print("done, temp="); Serial.print(temperature); Serial.println("C"); if (temperature < 5) { Serial.println("WARNING: Temperature probe reported an odd value"); } else { Serial.println("All test pass."); } Serial.println(); Serial.println("Press any key to go into sampling loop mode"); while (!Serial.available()); sensor.resetFifo(); } void loop() { uint16_t ir, red; sensor.update(); while (sensor.getRawValues(&ir, &red)) { Serial.print("IR="); Serial.print(ir); Serial.print(" RED="); Serial.println(red); } }
RESULTS
The MIKROE-2000 connected to the UNO
Terminal monitor of the test
Pressing any key, a data stream with the raw values from the photodiode sampling red and infrared is presented. With no finger on the sensor, both values should be close to zero and jump up when a finger is positioned on top of the sensor.
Hear are a few screenshots of the terminal monitor. The first one, is without a finger on the Sensor. The Second, is with my finger on the sensor.
VIDEO
TEST-2-- Connecting OLED and MIKROE-1581 to the Grove UNO Base Shield
UNO MCU + Grove Uno Base Shield + MIKROE-1581 + SSD1306 I2C OLED Display
This test will connect the two I2C connectors on the Grove shield with one end of a grove cable.
The other end of the grove cable will have four header wires with the male ends inserted into the female end of the grove cable.
the grove connector to jumper wires colors are:
- Grove Cable - Male Jumper
- YELLOW ------------ BLUE
- WHITE -------------- GREEN
- RED ------------------ RED
- BLACK -------------- BLACK
The colors of the header wires for the OLED and the MIKROE-1581, are as described in test one.
FIRMWARE CODE
I created a script that combined logic from the OLED_Test.ino firmware used in Test 1 with the logic in the MAX30100_Minimal.ino library example.
FIRMWARE NAME: BPM_UNO_TEST.ino
CODE:
/// BPM_UNO_TEST // This script contains the combined logic from the OLED_Test.ino firmware used in Test1 // with the logic in the MAX30100_Minimal.ino library example. // Include Wire Library for I2C #include <Wire.h> // Include Adafruit Graphics & OLED libraries #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "MAX30100_PulseOximeter.h" // sketch globals //int count; //BPM Value float count; //BPM Value // SSD1306 OLED CODE #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // MAX10100 CODE //#define REPORTING_PERIOD_MS 1000 #define REPORTING_PERIOD_MS 2000 // PulseOximeter is the higher level interface to the sensor // it offers: // * beat detection reporting // * heart rate calculation // * SpO2 (oxidation level) calculation PulseOximeter pox; uint32_t tsLastReport = 0; // Callback (registered below) fired when a pulse is detected void onBeatDetected() { Serial.println("Beat!"); } void setup() { Serial.begin(115200); // Start Wire library for I2C Wire.begin(); // initialize OLED with I2C addr 0x3C display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // MAX10100 CODE Serial.print("Initializing pulse oximeter.."); // Initialize the PulseOximeter instance // Failures are generally due to an improper I2C wiring, missing power supply // or wrong target chip if (!pox.begin()) { Serial.println("FAILED"); for(;;); } else { Serial.println("SUCCESS"); } // The default current for the IR LED is 50mA and it could be changed // by uncommenting the following line. Check MAX30100_Registers.h for all the // available options. // pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA); // Register a callback for the beat detection pox.setOnBeatDetectedCallback(onBeatDetected); count=2.00; } void displayValues(float v){ // Delay to allow sensor to stabalize delay(500); // Clear the display display.clearDisplay(); //Set the color - always use white despite actual display color display.setTextColor(WHITE); //Set the font size display.setTextSize(1); //Set the cursor coordinates display.setCursor(25,0); display.print("BPM"); display.setCursor(33,12); // display.setTextSize(3); display.setTextSize(1); display.print(v); //Serial.println(v); } void loop() { // Make sure to call update as fast as possible pox.update(); // Asynchronously dump heart rate and oxidation levels to the serial // For both, a value of 0 means "invalid" if (millis() - tsLastReport > REPORTING_PERIOD_MS) { Serial.print("Heart rate:"); //Serial.print(pox.getHeartRate()); //show the value on the OLED display count = pox.getHeartRate(); Serial.print(count); displayValues(count); Serial.print(" bpm / SpO2:"); Serial.print(pox.getSpO2()); Serial.println("%"); tsLastReport = millis(); } }
PHOTO
Terminal monitor output
RESULTS
- As you can see in the photo, the OLED screen is scrambled and not displaying the BPM value as expected.
- The terminal output first shows a sucessful Initilization, but then the results of the 2 values for the the functions getHeartRate() and getSp02() return zero?
- The code segment has the following comment
- // Asynchronously dump heart rate and oxidation levels to the serial
// For both, a value of 0 means "invalid"
This a problem and not working as anticipated.
Troubleshooting
- Is it Electrical -Test the wiring.
- Is the MIKROE-1581 connected OK? Is the OLED display connected OK?
- YES. If I run test1 firmware individual test, they both work. So it's not the wiring.
- Is the MIKROE-1581 connected OK? Is the OLED display connected OK?
- Is it the I2C BUS, since these two components are using the I2C BUS?
- Is the I2C interface working OK?
- I ran an I2C_Scanner sketch I found on Arduino.cc forum and it found 2 devices on the bus (0x3c, 0x57)
- 0x3c is the OLED because, I use it in the test firmware to initialize the OLED
- // initialize OLED with I2C addr 0x3C
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); - It doesn't matter what of the four I2C connectors on the Grove Shield you use. The OLED is using address 0x3C and the MAX30100 is using 0x57.
- // initialize OLED with I2C addr 0x3C
- Must be something wrong with the I2C logic. I'm not sure how the MAX30100 library assigns the I2C interface on the BUS? I will have to investigate further.
Conclusions and Findings
At the moment this test FAILED. There is something wrong with the way the MAX30100 Library is connecting the device to I2C BUS?
I noticed, that when i comment out the //displayValues(count); function call the serial output display the bpm and sp01 values non zero?
Then I unplug the MAX30100 click and uncomment the displayValues(count); ,the OLED still does not display the count value even though it's zero?
TEST-3-- Stacking the UNO Click Shield and connecting the Heart Rate Click and the OLED Display
UNO MCU + MIKROE-1581 + MIKROE-2000 + SSD1306
First , I had to solder the provided headers to the Click Shield. Once this was done, I connected the Heart Rate Click to MkroBUS #1 on the Shield. Then I ran the test script MAX30100_Tester.ino from test#1 above. This worked (gave a BPM on the serial terminal) , So my soldering job seems to be fine.
I connected 4 jumper wires to the MikroBUS #2 to the OLED Display a mounted on a breadboard. The jumper wires are:
- RED MikroBUS#2 3.3v to VCC on OLED
- BLACK MikroBUS#2 GND to GND on OLED
- BLUE MikroBUS#2 SCL to SCL OLED
- GREEN MikroBUS#2 SDA to SDA OLED
I then ran the script OLED_Test.ino, from Test#1. It ran fine.. GREAT!!
But now when I try to run BPM_UNO_TEST.ino , I get the same results as in Test#2. The OLED screen is scrambled and not displaying the BPM value.
I found out, that the reason why the screen is scrambled is because I did not include a command in my displayValues() function, that dumps all the previous commands to the OLED controller! So, I added the line display.display(),now the OLED initializes but the BPM"s values on the OLED are still zero. The terminal monitor also display's zero values for both Heart rate and SP02 percentage. This is telling me that the two library functions pox.getHeartRate(); and pox.getSpO2(); are returning 0. The comment in the library example which I based this test script on , stated "// For both, a value of 0 means "invalid". So the question is why is it ""Invalid"? the script gets valid readings, when I comment out the call to displayValues(count);? How come the OLED display commands are causing the library functions to fail?
I have very limited experience ithe I2C protocol. I decided to start trying to understand I2C and what would cause common problems. running two I2C devices on an I2C bus.
- Was it an addressing Issue? I found that the there were 2 distinct addresses for the two devices, I was setting the OLED address in my script and the address of the MAX30100, is being set in the MAX30100_PulseOximeter library. So, addressing is not the issue
- Is it a wiring problem?. I found a solution on the internet that involved pull-up resistors
-
"Each wire of the I2C bus contains a special purpose pull-up resistor that keeps the voltage on the bus at 3.3V unless one of the devices shorts to ground. This means that the physical interface at each device looks something like this:". I wired up two 4.7k resistors to by breadboard as described below in the photo.
- And it still is not working properly!. BPM's are still Zero!
- As shown in this video
- Is it a Voltage Problem? Could be but I was unable to prove this. I read, that you cannot have 2 device on the same I2C bus with different voltages? In this Case it might be a voltage problem because the MIKROE-2000 is 3.3v and the SSD1306 is 5v?
FIRMWARE CODE
Firmware sketch that test the MiKROE-2000 and the OLED at the running at the same time. This has been modified from Test#2, based on information I picked up in testing.
FIRMWARE NAME: BPM_UNO_TEST.ino
CODE:
/// BPM_UNO_TEST // This script contains the combined logic from the OLED_Test.ino firmware used in Test1 // with the logic in the MAX30100_Minimal.ino library example. // Include Wire Library for I2C #include <Wire.h> #include "MAX30100.h" #include "MAX30100_PulseOximeter.h" // Include Adafruit Graphics & OLED libraries #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // sketch globals //int count; //BPM Value float count; //BPM Value // SSD1306 OLED CODE #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels //// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // MAX10100 CODE #define REPORTING_PERIOD_MS 1000 // PulseOximeter is the higher level interface to the sensor // it offers: // * beat detection reporting // * heart rate calculation // * SpO2 (oxidation level) calculation PulseOximeter pox; uint32_t tsLastReport = 0; // Callback (registered below) fired when a pulse is detected void onBeatDetected() { Serial.println("Beat!"); } void setup() { Serial.begin(115200); // MAX10100 CODE Serial.print("Initializing pulse oximeter.."); // Initialize the PulseOximeter instance // Failures are generally due to an improper I2C wiring, missing power supply // or wrong target chip if (!pox.begin()) { Serial.println("FAILED"); //for(;;); } else { Serial.println("SUCCESS"); } // The default current for the IR LED is 50mA and it could be changed // by uncommenting the following line. Check MAX30100_Registers.h for all the // available options. // pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA); // Register a callback for the beat detection pox.setOnBeatDetectedCallback(onBeatDetected); // OLED CODE display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //display.begin(); display.print("OK"); display.display(); count=2.00; } void displayValues(float v){ // Delay to allow sensor to stabalize delay(2000); // Clear the display display.clearDisplay(); //Set the color - always use white despite actual display color display.setTextColor(WHITE); //Set the font size display.setTextSize(1); //Set the cursor coordinates display.setCursor(25,0); display.print("BPM"); display.setCursor(33,12); display.setTextSize(3); display.print(v); display.display(); Serial.print(" display: "); Serial.print(v); } void loop() { // Make sure to call update as fast as possible pox.update(); // Asynchronously dump heart rate and oxidation levels to the serial // For both, a value of 0 means "invalid" if (millis() - tsLastReport > REPORTING_PERIOD_MS) { Serial.print("Heart rate:"); //show the value on the OLED display count = pox.getHeartRate(); Serial.print(count); displayValues(count); Serial.print(" bpm / SpO2: "); Serial.print(pox.getSpO2()); Serial.println("%"); tsLastReport = millis(); } }
Conclusions and Finding
- One of the problems , was that , I was not executing the display.display() function from the display library. This fuction sends the commands to the OLED controller.
- The I2C_scanner.ino script is returning 2 addresses, for the 2 devices? So addressing is not an issue.
- Rewiring by adding 2 pull-up resistors, didn't seem to help?
- The PRIMARY problem seems to be , that any call to the MAX30100_PulseOximeter library, returns and invalid value? and I'm not sure why.
At this point I'm going to abandon the use of the OLED display (SSD1306) in my design. I will consider that the SSD1306 is not supported to use along with the MAX30100_PulseOximeter library. I will try another solution.
TEST-4-- Stacking the 2 Shields on the UNO and Using the Grove-LCD + MIKROE-2000
Arduino UNO + Grove Uno Base Shield + Grove-LCD RGB Backlight + MIKROE-1581 Arduino Click Shield + MIKROE-2000 Heart Rate Click
Since the SSD1306 was not working, I decided to try my Grove-LCD from my Grove Stater Kit, to display the Beats per Minute. I created a new Arduino sketch that contained the combined logic from the Grove-LCD examples with the logic in the MAX30100_Minimal.ino library example.
I attached the Grove cable to one of the 4 I2C connectors on the Grove Base Shield. The other end was attached to the Grove-LCD, as described in the photo. I then stacked the MIKROE-1581 Arduino Click Shield. Then placed then MIKROE-2000 Heart Rate Click into the mikroBUS socket on the click shield.
FIRMWARE CODE
This is the Firmware sketch, I used to test the MiKROE-2000 and the GROVE-LCD at the same time. Beats per minute are displayed on the LCD Screen as you place a finger onto the Heart Rate Click window.
CODE: BPM_UNO_GROVE_LCD_TEST.ino
/// BPM_UNO_GROVE_LCD_TEST // This script contains the combined logic from the Grove-LED examples // with the logic in the MAX30100_Minimal.ino library example. // Include Wire Library for I2C #include <Wire.h> #include "MAX30100.h" #include "MAX30100_PulseOximeter.h" // Grove OLED stuff #include "rgb_lcd.h" rgb_lcd lcd; const int colorR = 255; const int colorG = 100; const int colorB = 0; // sketch globals //int count; //BPM Value float count; //BPM Value // MAX10100 CODE #define REPORTING_PERIOD_MS 1000 // PulseOximeter is the higher level interface to the sensor // it offers: // * beat detection reporting // * heart rate calculation // * SpO2 (oxidation level) calculation PulseOximeter pox; uint32_t tsLastReport = 0; // Callback (registered below) fired when a pulse is detected void onBeatDetected() { Serial.println("Beat!"); } void setup() { Serial.begin(115200); Wire.begin(); // set up the LCD's number of columns and rows: lcd.begin(16, 2); lcd.setRGB(colorR, colorG, colorB); // Print a message to the LCD. lcd.print("Beats per Minute"); delay(1000); // MAX10100 CODE Serial.print("Initializing pulse oximeter.."); // Initialize the PulseOximeter instance // Failures are generally due to an improper I2C wiring, missing power supply // or wrong target chip if (!pox.begin()) { Serial.println("FAILED"); //for(;;); } else { Serial.println("SUCCESS"); } // The default current for the IR LED is 50mA and it could be changed // by uncommenting the following line. Check MAX30100_Registers.h for all the // available options. // pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA); // Register a callback for the beat detection pox.setOnBeatDetectedCallback(onBeatDetected); count=2.00; } void displayValues(float v){ // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); lcd.print(v); Serial.print(" Display: "); Serial.print(v); } void loop() { // Make sure to call update as fast as possible pox.update(); // Asynchronously dump heart rate and oxidation levels to the serial // For both, a value of 0 means "invalid" if (millis() - tsLastReport > REPORTING_PERIOD_MS) { Serial.print("Heart rate:"); //show the value on the OLED display count = pox.getHeartRate(); Serial.print(count); displayValues(count); Serial.print(" bpm / SpO2: "); Serial.print(pox.getSpO2()); Serial.println("%"); tsLastReport = millis(); } }
VIDEO
Terminal monitor output
RESULTS
This solution worked. After days and days of trying to get the SSD1306 display to work, this solution worked the first time. I'm not sure why though? If anyone reading this blog has an answer, please give me a comment.
Note: be sure that the Grove Base shield VCC switch is set to 5V, otherwise the LCD will not display text?
Conclusions and Finding
I'm not quit sure why this solution is working? But I'll run with it, and use the Grove LED for this challenge.
This calls for a redesign sketch. I will use the Grove LCD attached to the Grove Shield.
Summary & Conclusions
The testing phase went quite well. I found some Issues with my SSD1306 and had to abandon it for a working solution using the Grove-LCD from my personal Grove Stater Kit. Test # 4, was a solution that I came up with to solve my Display problems with the SSD1306. . I have used the grove starter kit and in particular the Grove-LCD, before, so it was an easy learning curve to get it implemented for the test.
Since I have used the Grove starter kit before, I thought to implement some additional features to my BPM Monitor.
- in addition to BPM values, Display SP02% values on the display
- Attach a buzzer from my Grove Starter kit to the Grove Base Shield. Program the buzzer to Buzz on every heartbeat detected.
- Attach an LED from the Grove Starter kit , and blink it on every heartbeat.
- Steps 2 and 3 can be done in the callback function onBeatDetected()
- // Callback (registered below) fired when a pulse is detected
void onBeatDetected()
{
Serial.println("Beat!");
}
These new features and the Redesign and implementation of the BPM Monitor will be described in Blog#5.
REFERENCES
List some referenced used to aid in my Testing and Implementation.