-
Notifications
You must be signed in to change notification settings - Fork 28
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
HRS3300 getting HRS data #5
Comments
@atc1441 has good example here There are two parts of the problem:
|
Oh, just noticed that you talk about HRS3300, not PAH8001, sorry. Anyway, I searcher for it recently and found some very similar library also for HRS3300, it has similar calls to process raw data together with accelerometer data just like the pxialg API. But no, I didn't try to read it yet. |
search github for hrs3000 (not hrs3300) and you will find the project with example, there is also keil library there |
Hello fanoush, yeah PAH8001 has already an engine built in so you just fetch the data. But with this HRS3300 only the raw values are stored on register. I misunderstood the datasheet or Must be lost from translation. Anyway did search last night here in github and not showing any results on mobile. Searched again this morning on PC and found what you are pointing. Actually I'm using the arduino platform based so I need to port this to work with Arduino. Thank you very much fanoush! I'll start working on this. Closing this issue (not actually but a question). |
OK, if you get something working, please don't hesitate to share. BTW which device you have? I will keep this issue open for future progress since HRS3300 is not working yet and people searching for it later will see it and will not create another issue. |
I'm using a B57 Smart bracelet I can access all parts including the accelerometer raw values at this moment. With the HRS3300 I had written already a library to access enable and disable it and read the HRS and ALS register. I spent the whole morning till this afternoon exploring the code but unfortunately based on my findings the source code in the kiel has dependencies that is not included on the whole project. I first started understanding the code and proceed with porting it with arduino but when I can't trace some extern functions I moved to SES to compile the whole project but I found out that it really has missing parts. Based on the functions on that library it sends the HRS and ALS data to a function that calculates the BP and heart rate which is declared as extern function. Tried searching that function but I guess that is already proprietary as I can't find anything. I think their function is good even though I don't know yet what inside of it since they used the ALS in that function in calculating the BP and HR and there is also a function which take account the accel values in calculation. My plan now is adapting my i2c code to the heart rate sensors that are read by analog which is common to manufacturers like adafruit and dfrobot. Or if you have other suggestions? Thanks again for the help. |
Hi please share your current code with me i want to take a look at it. I got some devices with this heartrate sensor I can Look in about ten hours into it |
Please try to send the raw data to serial and use the serial Plotter to watch how it looks |
I have closed the device so I have no access to the serial UART port currently. Im debugging thru the ble UART. I'll try later this night with larger screen on ipad since I can't visualize it over the phone since the screen is too small. Pardon the way this library is written since this is the first library I have made. I welcome corrections and suggestions. I uploaded it a moment ago. |
you could try to only send every 10th messaurement and then it should look better, or you could also take an averrage of the last 10 messauerements and only send that. just to see how it looks. |
by the way, what happens if you change the width ? |
I made a basic HRS3300 library for Arduino/nRF52 please look here: https://github.com/atc1441/HRS3300-Arduino-Library. you can replace the serial with bleserial and it should print the Heartrate to ble. |
Wow, very nice, thanks. So fortunately just the __hardfp_sqrt definition fix for Keil library was needed like with pah8001 library. |
Not exactly. This time it was __hardfp_sqrt and not __hardfp_sqrtf so not for float, but yes kind of the same. Also the hrs does not have a seperate define file for the library it is all within some other functions mixed up. Made a short demo video: https://youtu.be/I8Ch9Db_a7M |
So that what's missing with that library. Tested your library just now atc1441. This is good, haven't compared the BP yet with another smart band but by quick test I can read from 60-83 bpm. Thank you very much for immediate testing and library! Question: |
No problem, i wanted to do it anyway, and now was the right time^^ The timing is quite importand, so you need to pull at exactly 40ms or another value, but everytime the same persiod. I did not edit the compiled library, but it is possible to do it. extract the o file change the needed hex values in binary and combine it again with gcc ar or what it name was. for the sqrt you need to add this somewhere: https://github.com/atc1441/HRS3300-Arduino-Library/blob/master/src/HRS3300lib.cpp#L4 |
one could also add this one line __hardfp_sqrt method directly to the library, but it doesn't matter much as it is in the source that comes with it |
Ok noted on this. I added that line and the error is gone. Thanks again to both of you. Cheers! |
Hello! Any plan to include this into the Espruino-compatible bundle? |
Did you get the HRS3300 working? I'm using c/c++ and had access to the register but i get too high values on HRS register like around 14k to 15k. At first I taught that the bpm value should be the one stored on that register because it has HRS engine already but not. If you have a code that I can base my code then that would be a great help. TIA.
The text was updated successfully, but these errors were encountered: