Documentation ¶
Overview ¶
Package chip contains the Gobot adaptor for the CHIP
For further information refer to the chip README: https://gobot.io/x/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) I2cRead(address int, size int) (data []byte, err error)
- func (c *Adaptor) I2cStart(address int) (err error)
- func (c *Adaptor) I2cWrite(address int, data []byte) (err error)
- func (c *Adaptor) Name() string
- 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 XIO-P0 through XIO-P7 (pins 13-20 on header 14).
func (*Adaptor) DigitalWrite ¶ added in v1.0.0
DigitalWrite writes digital value to the specified pin. Valids pins are XIO-P0 through XIO-P7 (pins 13-20 on header 14).
func (*Adaptor) I2cRead ¶ added in v1.0.0
I2cRead returns value from i2c device using specified size
func (*Adaptor) I2cStart ¶ added in v1.0.0
I2cStart starts an i2c device in specified address. This assumes that the bus used is /dev/i2c-1, which corresponds to pins labeled TWI1-SDA and TW1-SCK (pins 9 and 11 on header 13).