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

A class representing a stroking actuator. More...

#include <StrokingActuator.h>

Inheritance diagram for StrokingActuator:
Actuator

Public Member Functions

 StrokingActuator (int pin)
 Constructor for StrokingActuator.
 
void activate () override
 Activates the stroking actuator.
 
void deactivate () override
 Deactivates the stroking 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 stroking actuator.

This actuator is designed to create a stroking sensation using a servo motor.

Constructor & Destructor Documentation

◆ StrokingActuator()

StrokingActuator::StrokingActuator ( int pin)
inline

Constructor for StrokingActuator.

Initializes the stroking actuator by attaching the servo to the specified pin and setting it to the initial position (0 degrees).

Parameters
pinThe GPIO pin to which the actuator is connected.

Member Function Documentation

◆ activate()

void StrokingActuator::activate ( )
inlineoverridevirtual

Activates the stroking actuator.

Moves the servo to 180 degrees to simulate a stroking motion.

Implements Actuator.

◆ deactivate()

void StrokingActuator::deactivate ( )
inlineoverridevirtual

Deactivates the stroking actuator.

Moves the servo back to 0 degrees.

Implements Actuator.


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