Motors

Functions for controlling the motors. Functions for controlling the motors. Found in motor.h. More...

Defines

#define FORWARD   1
 make the motors go forwards
#define BACKWARD   0
 make the motors go backwards

Functions

void motors_init (void)
 Initialize the motors.
void motor1_set (int direction, int speed)
 Set speed and direction of motor1.
void motor2_set (int direction, int speed)
 Set speed and direction of motor2.
void motors_off (void)
 Turn the motors off.

Detailed Description

Functions for controlling the motors. Functions for controlling the motors. Found in motor.h.


Function Documentation

void motor1_set ( int  direction,
int  speed 
)

Set speed and direction of motor1.

Sets the speed and direction of motor1. motors_init must be called before this function can be used.

Parameters:
direction Either FORWARD or BACKWARD to set the direction of rotation.
speed The speed the motor will run at, in the range 0-255.
See also:
motor2_set, motors_init

void motor2_set ( int  direction,
int  speed 
)

Set speed and direction of motor2.

Sets the speed and direction of motor2. motors_init must be called before this function can be used.

Parameters:
direction Either FORWARD or BACKWARD to set the direction of rotation.
speed The speed the motor will run at, in the range 0-255.
See also:
motor1_set, motors_init

void motors_init ( void   ) 

Initialize the motors.

Initializes both motors so that they can be used with future calls to motor1_set and motor2_set.

See also:
motors_off, motor1_set, motor2_set

void motors_off ( void   ) 

Turn the motors off.

Turns off both motors.

See also:
motors_init


Generated on Mon Sep 22 22:30:16 2008 for libdragonfly by  doxygen 1.5.4