upm
0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
|
C++ API for StepMotor Drivers. More...
This file defines the stepmotor C++ interface for libstepmotor
Public Member Functions | |
StepMotor (int dirPin, int stePin) | |
~StepMotor () | |
void | setSpeed (int speed) |
mraa_result_t | stepForward (int ticks) |
mraa_result_t | stepBackwards (int ticks) |
StepMotor | ( | int | dirPin, |
int | stePin | ||
) |
Instanciates a StepMotor object
dirPin | direction pin |
stePin | steper pulse pin |
void setSpeed | ( | int | speed | ) |
Set the speed of rotation
speed | rotation speed |
mraa_result_t stepForward | ( | int | ticks | ) |
Rotate motor forward
ticks | number of tickes the motor will move |
mraa_result_t stepBackwards | ( | int | ticks | ) |
Rotate motor backward
ticks | number of tickes the motor will move |