Documentation ¶
Overview ¶
Package easystepper provides a simple driver to rotate a 4-wire stepper motor.
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 holds the pins and the delay between steps
func New ¶
New returns a new easystepper driver given 4 pins numbers (not pin object), number of steps and rpm
func (*Device) Configure ¶ added in v0.9.0
func (d *Device) Configure()
Configure configures the pins of the Device
type DualDevice ¶ added in v0.9.0
type DualDevice struct {
// contains filtered or unexported fields
}
DualDevice holds information for controlling 2 motors
func NewDual ¶ added in v0.9.0
func NewDual(pin1, pin2, pin3, pin4, pin5, pin6, pin7, pin8 machine.Pin, steps int32, rpm int32) DualDevice
NewDual returns a new dual easystepper driver given 8 pins numbers (not pin object), number of steps and rpm
func (*DualDevice) Configure ¶ added in v0.9.0
func (d *DualDevice) Configure()
Configure configures the pins of the DualDevice
func (*DualDevice) Move ¶ added in v0.9.0
func (d *DualDevice) Move(stepsA, stepsB int32)
Move rotates the motors the number of given steps (negative steps will rotate it the opposite direction)
Click to show internal directories.
Click to hide internal directories.