Skip to content

PID controller using two brushless motors with they respective ESC, and an Arduino Mega 2560.

License

Notifications You must be signed in to change notification settings

Xtalism/aero-pid-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aero PID Controller

In order for the project to work, make sure to calibrate both ESC before running the main code. You gotta make sure you have installed the Servo and Wire Arduino libraries.

#include <Servo.h>
#include <Wire.h>

To read MPU6050's raw accelerometer and gyroscope data, we must register our MPU's hex addresses. Just as follows:

// Accelerometer raw data
Acc_rawX = Wire.read() << 8 | Wire.read();
Acc_rawY = Wire.read() << 8 | Wire.read();
Acc_rawZ = Wire.read() << 8 | Wire.read();

// Gyro raw data
Gyr_rawX = Wire.read() << 8 | Wire.read();
Gyr_rawY = Wire.read() << 8 | Wire.read();

If you'd like to make any changes, you can check the MPU6050's datasheet anytime you want.

structure

Ideal aero PID controller structure.

schematic

We can use any Arduino board, as long as SDA and SCL pins are available.

About

PID controller using two brushless motors with they respective ESC, and an Arduino Mega 2560.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages