Home

Defines | Functions

dwengoMotor.h File Reference

Motor functionality. More...

Defines

#define FORWARD   1
#define BACKWARD   0

Functions

void initMotor (void)
 Initialize motor functionality.
void setSpeedMotor1 (short speed)
 Set speed of motor 1.
void setSpeedMotor2 (short speed)
 Set speed of motor 2.
void stopMotors (void)
 Stop all motors.

Detailed Description

Motor functionality.

Control of motor driver on the Dwengo board


Function Documentation

void initMotor ( void  )

Initialize motor functionality.

Initializes motor functionality for Dwengo board. Includes configuratiation of motor pins to digital outputs, configuration of PWM-modules and Timer2

void setSpeedMotor1 ( short  speed)

Set speed of motor 1.

Sets speed of motor 1 in range [-1023,1023]. A delay of a few milliseconds is performed when switching speed abruptly from positive to negative or vice versa.

Parameters:
speed
void setSpeedMotor2 ( short  speed)

Set speed of motor 2.

Sets speed of motor 2 in range [-1023,1023]. A delay of a few milliseconds is performed when switching speed abruptly from positive to negative or vice versa.

Parameters:
speed
void stopMotors ( void  )

Stop all motors.

Sets speed of all motors to zero

 All Data Structures Files Functions Variables Defines

Generated on Wed Dec 25 2013 23:03:08 for Dwengo library by doxygen 1.7.3