Welcome to the EyeBot
Version 7 - RPi1
A Controller For Various Hardware IO
|
Defines functions to control servos and motors. More...
Functions | |
int | SERVOInit () |
Initialises the IO board and sets up tables for servos. More... | |
int | MOTORInit () |
Initialises the IO board and sets up tables for motors. More... | |
int | SERVORange (int servo, int low, int high) |
Sets the range for the servos. More... | |
int | SERVOSet (int servo, int angle) |
Set the given servos to the same given angle depending on table value. More... | |
int | SERVOSetRaw (int servo, int angle) |
Set the given servos to the same given angle in raw mode. More... | |
int | MOTORDriveRaw (int motor, int speed) |
Set the given motor to a given speed. More... | |
int | MOTORDrive (int motor, int speed) |
Set the given motors to the same given speed dependant on hdt table. More... | |
int | MOTORPID (int motor, int p, int i, int d) |
Set the given motors with PID control. More... | |
int | MOTORPIDoff (int motor) |
Shuts off PID control. More... | |
int | MOTORSpeed (int motor, int ticks) |
Sets the controlled motor speed in ticks/sec. More... | |
int | ENCODERRead (int quad) |
Reads the value from the encoder. More... | |
int | ENCODERReset (int quad) |
Resets the encoder, in reality just stores the current value of the encoder and subtracts it from future values. More... | |
Defines functions to control servos and motors.
int ENCODERRead | ( | int | quad | ) |
Reads the value from the encoder.
quad | the encoder to read from |
int ENCODERReset | ( | int | quad | ) |
Resets the encoder, in reality just stores the current value of the encoder and subtracts it from future values.
quad | the encoder to reset |
int MOTORDrive | ( | int | motor, |
int | speed | ||
) |
Set the given motors to the same given speed dependant on hdt table.
motor | the motor to set |
speed | : motor speed in percent |
Valid values for speed :
int MOTORDriveRaw | ( | int | motor, |
int | speed | ||
) |
Set the given motor to a given speed.
motor | the motor to set |
speed | : motor speed |
Valid values for speed :
int MOTORInit | ( | ) |
Initialises the IO board and sets up tables for motors.
int MOTORPID | ( | int | motor, |
int | p, | ||
int | i, | ||
int | d | ||
) |
Set the given motors with PID control.
motor | the motor to set |
p | the p setting |
i | the i setting |
d | the d setting |
int MOTORPIDoff | ( | int | motor | ) |
Shuts off PID control.
motor | the motor to set |
int MOTORSpeed | ( | int | motor, |
int | ticks | ||
) |
Sets the controlled motor speed in ticks/sec.
motor | the motor to set |
ticks | the number of ticks per sec |
int SERVOInit | ( | ) |
Initialises the IO board and sets up tables for servos.
int SERVORange | ( | int | servo, |
int | low, | ||
int | high | ||
) |
Sets the range for the servos.
servo | the servo to set |
low | the lower limit |
high | the upper limit |
int SERVOSet | ( | int | servo, |
int | angle | ||
) |
Set the given servos to the same given angle depending on table value.
servo | the servo number |
angle | the angle to set it to |
int SERVOSetRaw | ( | int | servo, |
int | angle | ||
) |
Set the given servos to the same given angle in raw mode.
servo | the servo to set |
int | angle : valid values = 0-255 |