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.
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
no luck......keep walking.
Bookmarks