![]() |
MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
|
A class for controlling a remote control (RC) servo. More...
#include <MiniR4RC.h>
Public Member Functions | |
MiniR4RC () | |
bool | begin (void) |
Initializes the servo with a default angle range. | |
bool | setHWDir (bool dir) |
Sets the hardware direction of the servo. | |
bool | setAngle (uint16_t angle) |
Sets the angle of the servo. | |
A class for controlling a remote control (RC) servo.
This template class provides methods to initialize and control a servo using its ID.
Note: Once you call MiniR4.begin(), the RC will auto begin.
ID | The unique identifier for the servo. |
Definition at line 21 of file MiniR4RC.h.
|
inline |
Definition at line 24 of file MiniR4RC.h.
|
inline |
Initializes the servo with a default angle range.
Sets the angle range of the servo to 0 to 180 degrees.
Definition at line 33 of file MiniR4RC.h.
|
inline |
Sets the angle of the servo.
Note: For 360 servo control command will update in future release.
angle | The desired angle to set (0-180). |
Definition at line 60 of file MiniR4RC.h.
|
inline |
Sets the hardware direction of the servo.
dir | True for forward direction, false for reverse direction. |
Definition at line 45 of file MiniR4RC.h.