Documentation ¶
Overview ¶
Package megapi provides the Gobot adaptor for MegaPi.
For more information refer to the README: https://github.com/hybridgroup/gobot/blob/master/platforms/megapi/README.md
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adaptor ¶ added in v1.0.0
type Adaptor struct {
// contains filtered or unexported fields
}
Adaptor is the Gobot adaptor for the MakeBlock MegaPi board
func NewAdaptor ¶ added in v1.0.0
NewAdaptor returns a new MegaPi Adaptor with specified serial port used to talk to the MegaPi with a baud rate of 115200
type MotorDriver ¶
type MotorDriver struct {
// contains filtered or unexported fields
}
MotorDriver represents a motor
func NewMotorDriver ¶
func NewMotorDriver(megaPi *Adaptor, port byte) *MotorDriver
NewMotorDriver creates a new MotorDriver at the given port
func (*MotorDriver) Connection ¶
func (m *MotorDriver) Connection() gobot.Connection
Connection returns the Connection associated with the Driver
func (*MotorDriver) SetName ¶ added in v1.0.0
func (m *MotorDriver) SetName(n string)
SetName sets the name of this motor
func (*MotorDriver) Speed ¶
func (m *MotorDriver) Speed(speed int16) error
Speed sets the motors speed to the specified value
func (*MotorDriver) Start ¶
func (m *MotorDriver) Start() error
Start implements the Driver interface