yes i havent send any data yet as i'm searching in the i2c how to do that corresponds to the max30102 manual.
At least i know sensor is responded by pulling SDA down on 9th bit. This is something for me.
yes i havent send any data yet as i'm searching in the i2c how to do that corresponds to the max30102 manual.
At least i know sensor is responded by pulling SDA down on 9th bit. This is something for me.
i've done many tries. I just want to see if the red LED inside the sensor is alive. At least by sending a command to activate it.
no luck......keep walking.Code:This is as from the pseudo code the first step. I really do not know if that is the right way to send Device ID + write mode Then send the FIFO_WR_PTR (i still dont know what are the bits needs to be configured) REPEAT START addr = $04 ; FIFO WRITE POINTER REG ADDR IS 0X04 i2cwrite SDA,scl,contwr i2cwrite SDA,scl,contwr,addr i2cwrite SDA,scl,contwr i2cwrite SDA,scl,contwr,addr Apart from pseudo code in the datasheet, Next i tried to send mode for the heart rate mode only addr = $09 ' mode configuration i2cwrite SDA,scl,contwr,addr,[modled],error ' ModLED = $02 as per data sheet heart rate mode only In the end i tried to send the led pulse amplitute. addr = $0C ' led pulse amplitute i2cwrite SDA,scl,contwr,addr,[led1_pa],error' LED1_PA = $3F , 12.6 mA
given that you can buy these for < $20us delivered to your door i doubt its worth while making them other than as an intellectual exercise
https://au.banggood.com/BOXYM-oFit-2...r_warehouse=CN
i have tried the sparkfun arduino demos and was not particularly impressed with accuracy or stability of readings obtained
{maybe my heart is inaccurate and unstable}
the raspberrypi code goes about it quite differently with some dsp done on data collected in a fixed sampling period [not tried it].
i have no experience with these things , i don't know if reverse engineering the arduino code is even worthwhile
but no matter how you go about it the sort of digital signal processing needed will be lots and lots of hard work with pbp
do you have a plan ? have you established optimal device settings to get the best readings ? how much data is needed and from where ?
reading and writing to the device is child's play, setting it up to get meaningful data and being able to extract information from that data is another story
Warning I'm not a teacher
Thanks both for your kind reply.
I will find the way. I know it is quite difficult and options are limited to use Arduino.
i tried the arduino code again with the sensor attached to my finger with a rubber band , it works a bit better that way
do you have a stl model for an enclosure ? . its difficult to make any sense of wildly unstable readings
i'm thinking a ESP8285 M3 board would make a better platform and allow use of arduino libs if they can be proven to be adequate
ESP8285's these cut down esp8266's are very cheap and still have more processing power than a bucket full of pic chips they are quite happy to run on two aaa batteries and consume little energy if wifi not engaged
Last edited by richard; - 4th September 2020 at 11:24.
Warning I'm not a teacher
Hi Richard,
once i have all the components (including the arduino board or ESP8285) then i will be ready to design the 3D cad model and printed.
I will order some arduino and ESP and check them out.
Bookmarks