Open saikumarelab opened 4 years ago
Thanks for reaching out. Can you share you code here? Also, paste it using insert code
for better legibility.
Hi, Thanks for your instant reply. Please find your code below , i tried with arduino nano. pulseoximeter_MAX30102-1.txt
Also i tried SPARKFUN library with Example 8 by changing the buffer size to 50 , still the Heartbeat values found to be 100-250.
Sorry, i have tried to insert the code and it is not working.
Thanks
I'm assuming that you know the pin config in my code are for NodeMCU and you have configured appropriately for your arduino board. I didn't try swapping registers in the actual sparkfun library since that library isn't that much usable either due to inaccuracy. That is why i extended aromring's work. Have you included the base library project https://github.com/aromring/MAX30102_by_RF in your sketch? My code utilizes that.
Yes I have included that library in my arduino library. I completely understand that your configurations are for nodemcu. So I would need your help to port your code for arduino uno
Even I have tried changing the pin mapping from your code..following are the details of pin oxiINT: pin2 and I have removed the oled. I had already attached the modified code earlier as text file for your reference.
Hi, Any updates ?
Hi,
your comments on the swapping made me to realize that the problem can be resolved. otherwise i would've tried using different boards.
i have tried using your code to Arduino nano / Arduino Uno and found the following issue,
Arduino: 1.6.9 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)"
WARNING: Category 'Robot' in library DBS-Lib is not valid. Setting to 'Uncategorized' libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\spo2_algorithm.cpp.o: In function `maxim_peaks_above_min_height(long, long, long*, long, long)':
C:\Users\hp\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/spo2_algorithm.cpp:232: multiple definition of `maxim_peaks_above_min_height(long, long, long*, long, long)'
libraries\MAX30102_by_RF-master\algorithm.cpp.o:C:\Users\hp\Documents\Arduino\libraries\MAX30102_by_RF-master/algorithm.cpp:233: first defined here
libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\spo2_algorithm.cpp.o: In function `maxim_peaks_above_min_height(long, long, long*, long, long)':
C:\Users\hp\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/spo2_algorithm.cpp:232: multiple definition of `maxim_sort_ascend(long*, long)'
libraries\MAX30102_by_RF-master\algorithm.cpp.o:C:\Users\hp\Documents\Arduino\libraries\MAX30102_by_RF-master/algorithm.cpp:233: first defined here
libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\spo2_algorithm.cpp.o: In function `maxim_peaks_above_min_height(long, long, long*, long, long)':
C:\Users\hp\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/spo2_algorithm.cpp:232: multiple definition of `maxim_sort_indices_descend(long, long, long)'
libraries\MAX30102_by_RF-master\algorithm.cpp.o:C:\Users\hp\Documents\Arduino\libraries\MAX30102_by_RF-master/algorithm.cpp:233: first defined here
libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\spo2_algorithm.cpp.o: In function `maxim_peaks_above_min_height(long, long, long*, long, long)':
C:\Users\hp\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/spo2_algorithm.cpp:232: multiple definition of `maxim_remove_close_peaks(long, long, long*, long)'
libraries\MAX30102_by_RF-master\algorithm.cpp.o:C:\Users\hp\Documents\Arduino\libraries\MAX30102_by_RF-master/algorithm.cpp:233: first defined here
libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\spo2_algorithm.cpp.o: In function `maxim_peaks_above_min_height(long, long, long*, long, long)':
C:\Users\hp\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/spo2_algorithm.cpp:232: multiple definition of `maxim_find_peaks(long, long, long*, long, long, long, long)'
libraries\MAX30102_by_RF-master\algorithm.cpp.o:C:\Users\hp\Documents\Arduino\libraries\MAX30102_by_RF-master/algorithm.cpp:233: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1 Error compiling for board Arduino Nano.
I have the Sparkfun library installed in my arduino ide v1.6.9 and by any chance do you have any idea to swap the registers in the Example 8 -SPO2 program of Sparkfun Max3010x Pulse and Pulseoximetry library to make it work with better SPO2 and HR
Thanks in Advance!!