19 Online
2 Member And 17 Guest
Members present at the site
Today Visits : 4192
Yesterday Visits : 4063
All Visits : 513654

Welcome to Electronoobs Q&A, where you can ask questions and receive answers from other members of the community.



Categories


0 like 0 dislike

I want to use a mpu6050 gyro and accelerometer module to read the angle the module is at and based on that angle, increase or decrease motor speed. I have modified the code from a self-balancing drone video which used PID. I attempted to remove the PID because it is unnecessary for my purpose of just reading the angle and changing motor speed while keeping the portions measuring angles. Then I added a simple if-then statement saying if the axis angle is within 0-45 degrees, set the motor speed to that (that anglex37) because the top motor speed is 2000 and it is not safe to go past 85% motor power in fear of damaging the vesc. I truly don't know how high of a speed I can code my motor to but I will adjust accordingly because I don't know if the Arduino motor speed is just rpms. 

Anyways here is the drone code:Drone code

Here is my code:My Code

in Arduino by (120 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...