GeBalanceBot/Reference/MiniBalance/CONTROL/control.h

17 lines
459 B
C
Raw Normal View History

2024-01-14 19:28:00 +08:00
#ifndef __CONTROL_H__
#define __CONTROL_H__
#include "sys.h"
#define Middle_angle 0 // 定义平衡角度为0
int EXTI15_10_IRQHandler(void);
int Balance(float angle,float gyro);
int Velocity(int encoder_left,int encoder_right);
void Motor_PWMSet(int motor_left,int motor_right);
int Motor_PWMLimit(int IN,int max,int min);
void Key(void);
u8 Turn_Off(float angle);
void IMU_GetAngle(void);
int myabs(int a);
#endif