I2C Bus speed

It does not look like anything but by changing the speed of the I2C bus, the data reading of the MPU-6050 is done in less than 1 ms instead of 2 ms

To change the speed of the I2C bus, you need to edit the file /boot/config.txt and add this line
 :
dtparam=i2c_arm_baudrate=400000
With this, I manage to run the control algorithm of my Quadcopter in less than 7 ms. I can thus guarantee a frequency of 100 Hz (100 loops per second)

As a reminder, at each loop, I read the data of the MPU-6050, I carry out all calculations and adjust accordingly the speed of the 4 engines.

Commentaires

Posts les plus consultés de ce blog

Attiny13A sleep mode

Esp-01 deep sleep mode

Install and configure OpenVPN on OSMC