A class representing a vibration actuator. More...
#include <VibrationActuator.h>
Public Member Functions | |
| VibrationActuator (int pin) | |
| Constructor for VibrationActuator. | |
| void | activate () override |
| Activates the vibration actuator. | |
| void | deactivate () override |
| Deactivates the vibration actuator. | |
Public Member Functions inherited from Actuator | |
| Actuator (int pin, ActuatorType type) | |
| Constructor for the Actuator class. | |
Additional Inherited Members | |
Protected Attributes inherited from Actuator | |
| int | pin |
| GPIO pin number the actuator is connected to. | |
| ActuatorType | actuatorType |
| Type of actuator (e.g., vibration, stroking, tabbing). | |
| bool | turnedOn = false |
| Flag to check if the actuator is currently active. | |
A class representing a vibration actuator.
This actuator uses a digital output pin to control a vibration motor.
|
inline |
Constructor for VibrationActuator.
Initializes the vibration actuator by setting the specified pin as an output and turning off the vibration motor initially.
| pin | The GPIO pin to which the actuator is connected. |
|
inlineoverridevirtual |
Activates the vibration actuator.
Turns on the vibration motor if it is not already on.
Implements Actuator.
|
inlineoverridevirtual |
Deactivates the vibration actuator.
Turns off the vibration motor if it is currently on.
Implements Actuator.