Comments (8)
Well, no wonder the SpO2 and HR numbers are zero: in your code you have commented out rf_heart_rate_and_oxygen_saturation() - the very routine that does all the signal processing!
Here, try this code and let me know of the outcome. Please copy and paste full output in the Serial monitor.
from max30102_by_rf.
Previously I tried to use the rf_heart_rate_and_oxygen_saturation() routine but it will not run pass that routine. That is why I commented out. Below is the full output in the Serial Monitor
Vbatt= 1.62
blink LED
Initialise MAX30102
Start calculate heart rate
Vbatt= 0.19
blink LED
Initialise MAX30102
Start calculate heart rate
from max30102_by_rf.
All right, it's time to see the raw data coming from the sensor. I need it to debug this issue. Please run the attached code and report full output in the Serial monitor.
from max30102_by_rf.
This is the full output in the Serial monitor.
output.txt
from max30102_by_rf.
Ah, we are getting somewhere. It looks like your microcontroller is reaching rf_heart_rate_and_oxygen_saturation(), can't handle it, then quits and restarts. This is why it runs setup() repetitively. My guess is that it runs out of memory.
Thus: what microcontroller do you use? When you compile the code (with Arduino IDE, I presume) you get the report of memory usage: what does it say about % memory used by code and data, respectively?
Adalogger's Cortex M0 microcontroller has enough memory and computational power to handle my algorithm. Yours may not...
from max30102_by_rf.
I admire your heart or service for the rookie problems of jaredwong92.
I will attempt to learn from his mistakes and also benefit from your analisis.
Regards,
Bob
from max30102_by_rf.
I am using ATmega32U4. You are right that the memory usage is very high.
Sketch uses 15160 bytes (46%) of program storage space. Maximum is 32256 bytes.
Global variables use 1902 bytes (92%) of dynamic memory, leaving 146 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.
Guess I need to use another algorithm to get the HR and SPO2
from max30102_by_rf.
Jared,
I suggest a better MCU; apparently ATmega32U4 is insufficient.
Unless you have other issues I consider this issue to be closed.
from max30102_by_rf.
Related Issues (20)
- Heart Rate Stuck at 93 HOT 1
- New code bug HOT 3
- File names and case sensitivity HOT 1
- using esp8266-12e HOT 3
- new code bug HOT 3
- MAX30102 FIFO returns IR data first (i.e. LED1 = IR & LED2 = Red) HOT 2
- Accurate HR and inaccurate spo2 with inaccurate low spo2 test sample HOT 4
- min_autocorrelation_ratio = 0.5??? HOT 1
- I cant found more detail sensor settings, problems with get values HOT 6
- HR always -999 or invalid while wearing sensor on wrist. HOT 11
- if (!sensor.begin()) HOT 1
- RED/IR sensor value looks strange HOT 4
- BUG and Improvement suggestions HOT 4
- Unable to understand the meaning/derivation of the way of calculating the slope of baseline HOT 1
- Max30102 is not powering up
- Need to change 50 Sampling Frequency / 1 Sampling Time HOT 6
- 30102 not working HOT 1
- Calibration issue -> Potential issue with maxim_max30102_read_fifo HOT 3
- Error while compiling HOT 3
- Float buffer allocation uses unnecessary memory HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from max30102_by_rf.