Ex Code. https://github.com/QuadTinnakon/Segway_Mega2560_V3
project_balance robot arduino mega 2560_RMUTSB
Balancing Robot arduino. ,,A two-wheel inverted pendulum robot
by: tinnakon kheowree
[email protected]
[email protected]
http://quad3d-tin.lnwshop.com/
https://www.facebook.com/tinnakonza
date: 22-02-2561(2018) V.1 Segway_Mega2560_V1 ,, Read mpu6050 ,,X Y Z
date: 26-02-2561(2018) Segway_Mega2560_V2 ,, Roop time 180 Hz ,PID Control ,Wheel Encoder
date: 27-02-2561(2018) Segway_Mega2560_V3 ,,Potentiometer attached to analog input 0,1,2,3 gain kp,ki,kd
support: Board arduino mega 2560 ,, GY521
• ATmega2560 16 MHz crystal oscillator
• MPU6050 Gyro Accelerometer //400kHz nois gyro +-0.05 deg/s , acc +-0.04 m/s^2
• L298N motor driver 2A 7-12 v
• Gear Motor 3V - 12V , 1:48
• Optical Wheel Encoder 15mA 3.3V-5V LM393 comparator
---------motor---------
int MOTOR_FrontL_PIN = 9;
int MOTOR_FrontR_PIN = 10;
int IN1A_PIN = 22;
int IN2A_PIN = 23;
int IN3B_PIN = 24;
int IN4B_PIN = 25;