-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spo2 and Hrcalc #4
Comments
Hi, Aj12384. Did you mean this? for i in range(37):
print(hrcalc.calc_hr_and_spo2(ir[25*i:25*i+100], red[25*i:25*i+100])) If so, the code is for getting HR/SpO2 by sliding 1 samples at an iteration. (-999, False, -999, False) # <- using ir[25:125], red[25:125]
(107, True, 99.43662599999999, True) # <- using ir[26:126], red[26:126]
(88, True, 99.519096, True) # <- using ir[27:127], red[27:127] As you can see, the output values fluctuate. If not, I could not get your question. Could you add some information? |
No I mean that in the hrcalc, whenever I run the code, I do not seem so be getting any output. The code just runs. |
You cannot see the output of Then, what happens if you use a variable, such as: |
It’s working but I’m just getting the same values over and over again. How do I get the actual bpm and spo2? |
Hi again, can you tell me how to display the actual BPM and SPO2 for the actual hrcalc.py? The code just runs and nothing happens... is there a variable I should define? |
Hi, I just added two comments on github.
…On Tue, Apr 7, 2020 at 11:52 PM vrano ***@***.***> wrote:
You cannot see the output of hrcalc.calc_hr_and_spo2() in your
environment, right?
Then, what happens if you use a variable, such as:
output_value = hrcalc.calc_hr_and_spo2(ir[:100], red[:100])
and print that value: print(output_value).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APDCXN7EUPXKLCNZYV7VBUTRLPYJJANCNFSM4MDNL67A>
.
|
Okay, please tell me what you did and what you got in detail. |
Here is what I did. |
I want to be able to get the actual reading from the sensor continously |
When I try to use this code, it runs but nothing else happens |
Actually, Could you try the code below? import max30102
import hrcalc
m = max30102.MAX30102()
for i in range(20): # try 20 times
red, ir = m.read_sequential() # if nothing is passed, this reads 100 values
print(hrcalc.calc_hr_and_spo2(ir, red)) I hope this works... |
Hi, What do you mean after loading red and ir for the hrcalc code given in the readme?
The text was updated successfully, but these errors were encountered: