#include <Motion.h>
Definition at line 27 of file Motion.h.
◆ Motor()
Motor::Motor |
( |
uint8_t |
pin, |
|
|
ledc_timer_t |
timer, |
|
|
ledc_channel_t |
channel |
|
) |
| |
◆ begin()
void Motor::begin |
( |
void |
| ) |
|
Initializes the motor.
Definition at line 10 of file Motor.cpp.
◆ getSpeed()
uint16_t Motor::getSpeed |
( |
void |
| ) |
|
returns the currently activ speed
- Returns
- current speedvalue of the motor
Definition at line 46 of file Motor.cpp.
◆ setSpeed()
void Motor::setSpeed |
( |
uint16_t |
duty | ) |
|
Set the Speed by changing the pwm. To avoid current peaks, a linear ramp-up is used.
- Attention
- it is requried at any time to use that method to access the motors or methods of the motionclass to avoid such peaks.
- Parameters
-
duty | the duty cyle that should be set, can be between 0-8192 |
Definition at line 25 of file Motor.cpp.
◆ channel
ledc_channel_t Motor::channel |
|
protected |
◆ duty
◆ pin
◆ timer
ledc_timer_t Motor::timer |
|
protected |
The documentation for this class was generated from the following files: