Closed saloni1307 closed 2 years ago
The arduino code and library used for testing the sensor hardware are provided here: SparkFun_Bio_Sensor_Hub_Library.zip
Testing and results: The sensor data is not consistent but a specific position on the sensor provides the required heart rate and Oxygen level measurements. The sensor is operated in Mode 1 where the following parameters are extracted from the sensor: body.heartrate - Heartrate body.confidence - Confidence in the heartrate value body.oxygen - Blood oxygen level body.status - Has a finger been sensed?
The test setup when the sensor is not taking any data (no finger detected):
Test setup when sensor taking data (finger detected):
Output on serial monitor for arduino:
I had to alter the scheduler code by adding some polled timer waits to get the correct timings for sending each command to sensor to set in application mode and extract the readings out of it
To implement the low power functionality, I send a couple of commands to turn off the sensor and the algorithm, that is once the sensor is done extracting all the required samples out of it
Here are the final results:
This image shows once the sensor is activated, it will prompt the user to place their finger to take the readings:
The following image shows when the sensor starts taking samples:
Only after the sensor detects the finger correctly, it will start taking the samples and display it on the lcd the number of samples taken:
If the sensor doesnt take total 10 samples and the user lifts the finger somewhere in the middle it will denote the number of samples taken and prompt the user to place the finger back and not lift it unless all the samples are taken correctly:
This image shows the heart rate readings:
As I send the stop commands to the sensor it turns off the sensor and the led goes off:
Taking the readings for the next sensor, after initializing it again:
Oxygen level rate output:
Task list
Blockers