Skip to content
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

HR sensor #5

Open
scientistnobee opened this issue May 13, 2018 · 9 comments
Open

HR sensor #5

scientistnobee opened this issue May 13, 2018 · 9 comments

Comments

@scientistnobee
Copy link

Hi Curt,

Thanks for all your good work. I am able to flash code into ID107HR fitness tracker that shows accelometer data onto its screen. Now, I would like to access it's HR sensor. Do you have any code that works with this sensor? I worked with only Arduino but never with mbed. So, any help with sensor is highly appreciated.

@54696d21
Copy link
Contributor

Hi,

I’m not Curt but maybe I can help you too :)
According this blog post: http://www.rogerclark.net/new-nrf52832-based-smart-watch-available/
the sensor is a Si1143. There is a Arduino library for it:
https://github.com/moderndevice/SI1143_Pulse_Prox_Sensors
and two others for a different model oft he sensor:
https://github.com/adafruit/Adafruit_SI1145_Library
https://github.com/Seeed-Studio/Grove_Sunlight_Sensor
The example of the Adafruit library compiles successfully with the board set to "Generic NRF52"

@scientistnobee
Copy link
Author

Thanks for offering help. Yes, the Adafruits example compiled for my 1D107HR although it is based on nRF51. But it is written for SI1145, while the sensor in 1D107HR is SI1143. I don't know how this will go. I will test tomorrow. I know the I2C id of this device is 0x5A, I will make the necessary changes. Also, Mark @micooke is working on a library for this sensor. Examples in that library are also successfully compiled.

@micooke
Copy link

micooke commented May 14, 2018

My library is a fork of the modern devices one, but it's as a class not just sequential i2c calls.
The Si114x series are all very similar. My library should work with the Si1145 (and visa versa), but it won't set up the UV sensor (the only difference to the Si1143). From memory the Si1142 is a Si1143 without the IR sensor.

@scientistnobee
Copy link
Author

Hi Mark, I think SI1143 library might work with SI1141/Si1142/Si1143. But I think Si1145 is significantly different. In particular the register values in the library looks very different. A very small question. Do you think the below line in your library (Si114x_defs.h) should changed to PARAM_I2C_ADDR = 0x5A, instead of current PARAM_I2C_ADDR = 0x00.

@micooke
Copy link

micooke commented May 15, 2018

Nope, you are referring to a parameter offset table.
The default address in the class instantiation.

@scientistnobee
Copy link
Author

scientistnobee commented May 15, 2018

Hi, I have uploaded the adafruits test code for Si1145 and it outputs that "Didn't find Si1145" In the library its I2C address is 0X5A, same as the address of the Si1143 device in ID107HR, still it didn't work.

@micooke
Copy link

micooke commented May 15, 2018

(this should have been asked in the adafruit github) - line 29 of Adafruit_SI1145.cpp is looking for a 45, you need to change this to 43

@curtpw
Copy link
Owner

curtpw commented May 15, 2018

I think Mark has the Si114x covered. I'm working on a version of the PulseSensor code (https://github.com/WorldFamousElectronics/PulseSensorPlayground) for the X9 and N68 which have a green LED and photosensor directly broken out. Unless someone is opposed I'm going to add sensor/peripheral libraries that emerge from threads like this to the common --> libraries directory.

@scientistnobee
Copy link
Author

Hi everyone, I am now able to blink the green LEDS on the Si1143 using the code posted by @najnesnaj in the below link. I modified little bit to turn off the LEDS, otherwise LEDS are blinking all the time. Now, I will focus on getting the photodiode values. Thanks everyone for your support so far.

https://github.com/najnesnaj/smartband.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants