danislav / heartrate Goto Github PK
View Code? Open in Web Editor NEWHeartRate monitor HRM2101 USB python script
HeartRate monitor HRM2101 USB python script
This is not related to the code, but I've been trying to find an appropriate heart rate monitor with a usb interface with no luck. Is there any chance you can find the one you used initially and provide a link? would be greatly appreciated.
Congratulations. This code works for Windows.
I'm wondering, how hard it would be to port it to Pydroid (for Android)?
What could be used in place of calls to msvcrt and pywinusb.hid?
Dear Danishlav,
I know this is not the right forum. However, I have bought the HRM USB device and did not got the CD with the software. If you still have HRM2101.exe can you please send me the same. Because that device is of no use for me without the software.
Thanks
What about a 24 bit ADC inside the box?
Maybe the 24 bits of the output corresponds to the 3 bytes of the columns:
MSB | | LSB
byte 2 | byte 1 | byte 0
column 4 | column 5 | column 6
This could explain why the values of columns 5 and 6 are changing faster.
You can try the hypothesis using the struct library.
https://docs.python.org/2/library/struct.html
Something like this:
from struct import *
#reorder the bytes in little endian
buffer=struct.pack ('BBBB',data[5], data[4], data[3], 0x00)
#convert 3 bytes to unsigned int
ADCvalue=struct.unpack ('I', buffer)
Then graph all the values.
http://i01.i.aliimg.com/img/pb/681/397/670/670397681_909.jpg
Hi,
i get this error when i run the script:
Traceback (most recent call last): File "hrm.py", line 178, in <module> raw_test() File "hrm.py", line 141, in raw_test if found_option: UnboundLocalError: local variable 'found_option' referenced before assignment
Any ideas what might be wrong?
Running Python 6.3.4 and installed pywinusb with pip.
Regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.