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) 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 ¶
type Adaptor struct {
// contains filtered or unexported fields
}
Adaptor represents a Gobot Adaptor for a C.H.I.P.
func (*Adaptor) DigitalRead ¶
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 ¶
DigitalWrite writes digital value to the specified pin. Valids pins are XIO-P0 through XIO-P7 (pins 13-20 on header 14).
func (*Adaptor) I2cStart ¶
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).