I have these information: x, y from gyroscope.
1, 2, 3, 4: motors
If the quadcopter is slant to front y is a positive number.
If the quadcopter is slant to back y is a negative number.
If the quadcopter is slant to right x is a positive number.
If the quadcopter is slant to left x is a nevative number.
1 front 2
\ /
\ - /
left | | right
/ - \
/ \
3 back 4
I try to add the value from gyroscope to motors speed, like:
updateSpeed(m1 + y * -1, motor1)
updateSpeed(m2 + y * -1, motor2)
m1, m2 are actually speed of a motor and motor1, motor2 are the pins number that RPi send servo semnals.
How can I balance my quadcopter using python 2.7?
Thanks in advance.