Documentation ¶
Overview ¶
Package chip contains the Gobot adaptor for the CHIP
For further information refer to the chip README: https://github.com/hybridgroup/gobot/blob/master/platforms/chip/README.md
Index ¶
- type Adaptor
- func (c *Adaptor) Connect() (err error)
- func (c *Adaptor) DigitalRead(pin string) (val int, err error)
- func (c *Adaptor) DigitalWrite(pin string, val byte) (err error)
- func (c *Adaptor) Finalize() (err error)
- func (c *Adaptor) GetConnection(address int, bus int) (connection i2c.Connection, err error)
- func (c *Adaptor) GetDefaultBus() int
- func (c *Adaptor) Name() string
- func (c *Adaptor) PwmWrite(pin string, val byte) (err error)
- func (c *Adaptor) ServoWrite(pin string, angle byte) (err error)
- func (c *Adaptor) SetName(n string)
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 represents a Gobot Adaptor for a C.H.I.P.
func (*Adaptor) DigitalRead ¶ added in v1.0.0
DigitalRead reads digital value from the specified pin. Valids pins are the XIO-P0 through XIO-P7 pins from the extender (pins 13-20 on header 14), as well as the SoC pins aka all the other pins.
func (*Adaptor) DigitalWrite ¶ added in v1.0.0
DigitalWrite writes digital value to the specified pin. Valids pins are the XIO-P0 through XIO-P7 pins from the extender (pins 13-20 on header 14), as well as the SoC pins aka all the other pins.
func (*Adaptor) GetConnection ¶ added in v1.2.0
GetConnection returns a connection to a device on a specified bus. Valid bus number is [0..2] which corresponds to /dev/i2c-0 through /dev/i2c-2.
func (*Adaptor) GetDefaultBus ¶ added in v1.2.0
GetDefaultBus returns the default i2c bus for this platform
func (*Adaptor) ServoWrite ¶ added in v1.4.0
ServoWrite writes a servo signal to the specified pin