/* * servos_and_motors.h * * Created on: 10 Jun 2013 * Author: Remi KEAT */ /** * \file servos_and_motors.h * \brief Header file for the servos and motors functions * \author Remi KEAT */ #ifndef SERVOS_AND_MOTORS_H_ #define SERVOS_AND_MOTORS_H_ #include "serial.h" #include "types.h" int SERVOSet (SERVOHandle handle, int angle); int SERVORange(int servo, int low, int high); // Set servo [1..14] limits in 1/110 sec int MOTORDrive (MOTORHandle handle, int speed); int MOTORPID(int motor, int p, int i, int d); // Set motor [1..4] PID controller values [1..255] int MOTORPIDoff(int motor); // Stop PID control loop int MOTORSpeed(int motor, int ticks); // Set controlled motor speed in ticks/100 sec int ENCODERRead(int quad); // Read quadrature encoder [1..4] int ENCODERReset(int quad); // Set encoder value to 0 [1..4] #endif /* SERVOS_AND_MOTORS_H_ */