Documentation ¶
Overview ¶
Package l293x provides a driver to the L293/L293D H-bridge chip typically used to control DC motors.
Datasheet: https://www.ti.com/lit/ds/symlink/l293d.pdf
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device is a motor without speed control. a1 and a2 are the directional pins. en is the pin turns the motor on/off.
type PWMDevice ¶
type PWMDevice struct {
// contains filtered or unexported fields
}
PWMDevice is a motor with speed control. a1 and a2 are the directional GPIO pins. en is the PWM pin that controls the motor speed.
func NewWithSpeed ¶
NewWithSpeed returns a new PWMMotor driver that uses a PWM pin to control speed.
Click to show internal directories.
Click to hide internal directories.