mbedを用いた制御学生の制御 / motorlib
Embed: (wiki syntax)

« Back to documentation index

MOTOR Class Reference

MOTOR Class Reference

Interface to control a standard DC motor. More...

#include <Motor.h>

Public Member Functions

void setmode (int select)
 Set the mode of the Motor driver.
void speed (float speed)
 Set the speed of the motor.

Detailed Description

Interface to control a standard DC motor.

with an H-bridge using a PwmOut and 2 DigitalOuts

Definition at line 10 of file Motor.h.


Member Function Documentation

void setmode ( int  select )

Set the mode of the Motor driver.

select>0 = LAP select=0 = SM(default)

void speed ( float  speed )

Set the speed of the motor.

Parameters:
speedThe speed of the motor as a normalised value between -1.0 and 1.0

Definition at line 20 of file Motor.cpp.