Braille Glove
 
Loading...
Searching...
No Matches
Actuator Class Referenceabstract

Abstract class for implementing different types of actuators. More...

#include <Actuator.h>

Inheritance diagram for Actuator:
StrokingActuator TabbingActuator VibrationActuator

Public Member Functions

 Actuator (int pin, ActuatorType type)
 Constructor for the Actuator class.
 
virtual void activate ()=0
 Pure virtual function to activate the actuator.
 
virtual void deactivate ()=0
 Pure virtual function to deactivate the actuator.
 

Protected Attributes

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

Abstract class for implementing different types of actuators.

This class provides a base for all actuator types, defining common properties and methods.

Constructor & Destructor Documentation

◆ Actuator()

Actuator::Actuator ( int pin,
ActuatorType type )
inline

Constructor for the Actuator class.

Parameters
pinThe GPIO pin to which the actuator is connected.
typeThe type of actuator.

Member Function Documentation

◆ activate()

virtual void Actuator::activate ( )
pure virtual

Pure virtual function to activate the actuator.

This function must be implemented by derived classes to define how the actuator should be activated.

Implemented in StrokingActuator, TabbingActuator, and VibrationActuator.

◆ deactivate()

virtual void Actuator::deactivate ( )
pure virtual

Pure virtual function to deactivate the actuator.

This function must be implemented by derived classes to define how the actuator should be deactivated.

Implemented in StrokingActuator, TabbingActuator, and VibrationActuator.


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