Here is the code: https://github.com/wagnerc4/flight_controller
A stabilization system for drones using a pyboard, a MPU6050 and a RC receiver
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Here is the code: https://github.com/wagnerc4/flight_controller
Here the github repository:
The actual code for the pyboard are divided in 5 scripts:
rc.py -> read pwm from receiver
esc.py -> send pwm to speeds
mpu.py -> read accelerometer and gyroscope
pid.py -> stabilize the multicopter
main.py -> joins all scripts
And 1 script for the simulator on the laptop:
MPUTeapot.py
Now I'm working with the telemetry
My FrSky transmiter y receiver has arrived!!!
Create an account to leave a comment. Already have an account? Log In.
The pyboard build-in accelerometer only have accelerometer.... The mpu6050 have gyroscope and accelerometer. In the main.py are commented the code for use the build-in accelerometer:
#accel = pyb.Accel()
imu = MPU6050()
.....
#x, y, z = accel.filtered_xyz()
x, y, z = imu.get_xyz()
......
You only have to switch this commented lines.
The problem with the built-in accelerometer is that when you shake, it throw wrong data... I have checked the accelerometer documentation and it can determine shake movements, but this feature seems not implemented in the micropython pyboard.
http://micropython.org/resources/datasheets/MMA7660FC.pdf
The mpu6050 doesn't have problems with shake movements....
But wait, doesn't pyboard have a build-in accelerometer already?
Become a member to follow this project and never miss any updates
Finally found this