MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4RC< ID > Class Template Reference

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.
 

Detailed Description

template<uint8_t ID>
class MiniR4RC< ID >

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.

Template Parameters
IDThe unique identifier for the servo.

Definition at line 21 of file MiniR4RC.h.

Constructor & Destructor Documentation

◆ MiniR4RC()

template<uint8_t ID>
MiniR4RC< ID >::MiniR4RC ( )
inline

Definition at line 24 of file MiniR4RC.h.

Member Function Documentation

◆ begin()

template<uint8_t ID>
bool MiniR4RC< ID >::begin ( void )
inline

Initializes the servo with a default angle range.

Sets the angle range of the servo to 0 to 180 degrees.

Returns
true if initialization was successful, false otherwise.

Definition at line 33 of file MiniR4RC.h.

◆ setAngle()

template<uint8_t ID>
bool MiniR4RC< ID >::setAngle ( uint16_t angle)
inline

Sets the angle of the servo.

Note: For 360 servo control command will update in future release.

Parameters
angleThe desired angle to set (0-180).
Returns
true if the angle was set successfully, false otherwise.

Definition at line 60 of file MiniR4RC.h.

◆ setHWDir()

template<uint8_t ID>
bool MiniR4RC< ID >::setHWDir ( bool dir)
inline

Sets the hardware direction of the servo.

Parameters
dirTrue for forward direction, false for reverse direction.
Returns
true if the direction was set successfully, false otherwise.

Definition at line 45 of file MiniR4RC.h.


The documentation for this class was generated from the following file: