Stm32Project/Inc/servo.h

9 lines
238 B
C

#include "main.h"
//Tanslate angle into Capture Compare Register value
#define ANGLETOCCR(angle) (2000 * (angle) / 180 + 500)
extern int16_t Servo_Speed,Servo_goal,Servo_position;
void Servo_SetAngle(int goal);
int Servo_toward(void);