MPU-6050 read register


#1

Hi, i need some help:
i need to read various registers (1 bytes once) and convert to an integer “human readable” value, with i2c protocol correctly set on Esp32 devKit.
How can i resolve?


#2

hi @Alessandro_Giaquinto
Currently the MPU-6050 is not supported by Zerynth, but you can write the driver yourself since it uses I2C interface using the I2C module.
You can also use the BOSCH BNO055 , It is 9-axis Absolute Orientation Sensor, In addition it is already supported by library in Zerynth IDE.

Iet me know if you needed help!


#3

Thank you so much for your response.
So i obtain a working communication of the MPU-6050 with i2c protocol, but with incorrect value. I need to know how to create a correctly subclass of i2c, because the example
don’t work for me.
Can you help me with this?


#4

It has to match the communication scheme of the device according to its datasheet.
for example the device may require a start signal then a read, or a start then write_read function.
i mean the order of the operations by the i2C bus has to match the device requirements in the datasheet.
You can also look at other made libraries for that device to see the difference.