Braille Glove
 
Loading...
Searching...
No Matches
VibrationActuator Class Reference

A class representing a vibration actuator. More...

#include <VibrationActuator.h>

Inheritance diagram for VibrationActuator:
Actuator

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.
 

Detailed Description

A class representing a vibration actuator.

This actuator uses a digital output pin to control a vibration motor.

Constructor & Destructor Documentation

◆ VibrationActuator()

VibrationActuator::VibrationActuator ( int pin)
inline

Constructor for VibrationActuator.

Initializes the vibration actuator by setting the specified pin as an output and turning off the vibration motor initially.

Parameters
pinThe GPIO pin to which the actuator is connected.

Member Function Documentation

◆ activate()

void VibrationActuator::activate ( )
inlineoverridevirtual

Activates the vibration actuator.

Turns on the vibration motor if it is not already on.

Implements Actuator.

◆ deactivate()

void VibrationActuator::deactivate ( )
inlineoverridevirtual

Deactivates the vibration actuator.

Turns off the vibration motor if it is currently on.

Implements Actuator.


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