TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
IMotor< T > Class Template Referenceabstract

Abstract base class for all motor driver types. More...

#include <IMotor.h>

Inheritance diagram for IMotor< T >:
Inheritance graph
[legend]

Public Member Functions

virtual bool begin ()=0
 
virtual void end ()=0
 
virtual bool isPinsSet () const =0
 
virtual bool setValuePercent (T percent)=0
 
virtual T getValuePercent () const =0
 
void setID (uint8_t id)
 
uint8_t getID () const
 

Protected Attributes

uint8_t id = 0
 

Detailed Description

template<typename T = float>
class tinyrobotics::IMotor< T >

Abstract base class for all motor driver types.

The Motor class defines a common interface for all motor drivers in the library. It enforces the implementation of:

All specific motor driver classes (e.g., HBridge, ServoMotor) should inherit from Motor.

Member Function Documentation

◆ begin()

virtual bool begin ( )
pure virtual

Implemented in StepperMotor< T >, and GenericMotor< T >.

◆ end()

virtual void end ( )
pure virtual

◆ getValuePercent()

virtual T getValuePercent ( ) const
pure virtual

Implemented in GenericMotor< T >.

◆ isPinsSet()

virtual bool isPinsSet ( ) const
pure virtual

◆ setValuePercent()

virtual bool setValuePercent ( percent)
pure virtual

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