We got a boad with BLE113 Bluetooth chip onboard and mma8451Q sensor.
The board has SDK and in the SDK there is only i2c read and write functions.
Can you please give an example of how to read full X Y Z values using only read and write functions?
Please, we have tried so many, but we cannot get any adequate result.
MMA845X_STATUS = 0x00,
what we do is we activate the accelerometer:
acc(0:1)=$2a #CTRL_REG1 address
acc(1:1)=3 #enable accelerometer, set fast mode
then we read the values
call hardware_i2c_write($38,0,1,acc(0:1))#set address
call hardware_i2c_read($38,1,6)(result,data_len,tmp(0))#read data
This suppose to read the values high and low bytes but it does not work this way.
The return value is 3 bytes only,