I am unable to find the reason for a problem that i am facing.
In my drone project that uses Hifive1 as the flight controller,
*Using Arduino pro Mini i converted 6 pwm channels from the receiver into single PPM signal.
*I decode this PPM signal in my ISR and get separate channel values
*My main loop has many functions
->gyroscope values read
->Reading battery voltage
->And some minor mathematical calculations
*When i place all the controller sticks at the center it must give 1500 (+/-2)
*When i call gyro read values function in the loop the PPM values are noisy , say 1500(+/-20 or even 30)
*If i comment the gyroscope values read function ,the PPM values are as expected.
*Due to this problem,My drone is unstable
*I am using SW i2c library from westerndigital for mpu6050 sensor
- I googled to find out the reason and solution for the issue, after 3 days i got to know about a guy who had faced more or less similar issue ! https://stackoverflow.com/questions/52202279/ppm-output-is-noisy-when-reading-from-sensors-over-i2c
Is the solution from that guy is true?
Should i buy sensor like MPU9250 that has SPI interface instead of MPU6050 ?
Kindly clear my doubts about the reason for the issue.