0

Guys i have built a drone. And in that i have used mpu6050 to act as a self balancing mechanism. Now i want to devlop it to include altitude holding as well. But i am having a trouble because i have no idea how co get the altitude measurements from the mpu6050. My idea is to get the altitude at each motor speed level and then give those measurements as the thresholds and to write the code with if/else to keep the drone at a certain altitude by ajusting the motor speeds automatically. So can someone help me to get z axis movement readings from mpu6050???

  • The mpu6050 senses _rates_, not values. To get altitude, you'd need to integrate vertical acceleration twice. This will be extremely imprecise. You need something like a MPL3115A2 to sense atmospheric pressure, which correlates to altitude. – Gene Apr 07 '18 at 04:26
  • U mean to get the altitude of the drone? So how should i write the code. Do u have any example or something? Which i can refer? – Husmi Akshara Apr 07 '18 at 04:55

0 Answers0