DriveMaster
Loading...
Searching...
No Matches
HBridge Class Reference
Inheritance diagram for HBridge:
[legend]
Collaboration diagram for HBridge:
[legend]

Public Member Functions

 HBridge (int pin, int dir_pin)
 
void begin () override
 Initialize the motor control.
 
void write (int16_t value) override
 Write a command to the motor using an 8-bit signed integer value. The value ranges from -255 to 255, where:
 
- Public Member Functions inherited from DriveMaster
 DriveMaster (int pin)
 Construct a new DriveMaster object with only the pin.
 
 DriveMaster (int pin, int dir_pin)
 Construct a new DriveMaster object with the specified pin and direction pin.
 
virtual ~DriveMaster ()
 Destroy the DriveMaster object.
 
virtual void write (uint16_t value, bool telemetery=false)
 Write a command to the motor.
 
virtual void sendCommand (uint16_t value)
 Send a command to the motor.
 
virtual void sendValue (uint16_t value)
 Send a value to the motor.
 

Additional Inherited Members

- Protected Attributes inherited from DriveMaster
int _pin
 
int _dir_pin
 

Member Function Documentation

◆ begin()

void HBridge::begin ( )
overridevirtual

Initialize the motor control.

Reimplemented from DriveMaster.

◆ write()

void HBridge::write ( int16_t value)
overridevirtual

Write a command to the motor using an 8-bit signed integer value. The value ranges from -255 to 255, where:

  • 255 is full speed forward
  • -255 is full speed reverse
  • 0 is stop
    Parameters
    valueThe signed 8-bit command value to write (-255 to 255).

Reimplemented from DriveMaster.


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