|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for the Stepper motor library. More...
This file defines the stepmotor C++ interface
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 GPIO pin |
| stePin | steper pulse PWM 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 |
1.8.9.1