gobot: gobot.io/x/gobot/platforms/chip Index | Files

package chip

import "gobot.io/x/gobot/platforms/chip"

Package chip contains the Gobot adaptor for the CHIP and CHIP Pro

For further information refer to the chip README: https://github.com/hybridgroup/gobot/blob/master/platforms/chip/README.md

Index

Package Files

chip_adaptor.go chip_pinmap.go chippro_pinmap.go doc.go

type Adaptor Uses

type Adaptor struct {
    // contains filtered or unexported fields
}

Adaptor represents a Gobot Adaptor for a C.H.I.P.

func NewAdaptor Uses

func NewAdaptor() *Adaptor

NewAdaptor creates a C.H.I.P. Adaptor

func NewProAdaptor Uses

func NewProAdaptor() *Adaptor

NewAdaptor creates a C.H.I.P. Pro Adaptor

func (*Adaptor) Connect Uses

func (c *Adaptor) Connect() (err error)

Connect initializes the board

func (*Adaptor) DigitalPin Uses

func (c *Adaptor) DigitalPin(pin string, dir string) (sysfsPin sysfs.DigitalPinner, err error)

digitalPin returns matched digitalPin for specified values

func (*Adaptor) DigitalRead Uses

func (c *Adaptor) DigitalRead(pin string) (val int, err error)

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 Uses

func (c *Adaptor) DigitalWrite(pin string, val byte) (err error)

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) Finalize Uses

func (c *Adaptor) Finalize() (err error)

Finalize closes connection to board and pins

func (*Adaptor) GetConnection Uses

func (c *Adaptor) GetConnection(address int, bus int) (connection i2c.Connection, err error)

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 Uses

func (c *Adaptor) GetDefaultBus() int

GetDefaultBus returns the default i2c bus for this platform

func (*Adaptor) Name Uses

func (c *Adaptor) Name() string

Name returns the name of the Adaptor

func (*Adaptor) PWMPin Uses

func (c *Adaptor) PWMPin(pin string) (sysfsPin sysfs.PWMPinner, err error)

pwmPin returns matched pwmPin for specified pin number

func (*Adaptor) PwmWrite Uses

func (c *Adaptor) PwmWrite(pin string, val byte) (err error)

PwmWrite writes a PWM signal to the specified pin

func (*Adaptor) ServoWrite Uses

func (c *Adaptor) ServoWrite(pin string, angle byte) (err error)

ServoWrite writes a servo signal to the specified pin

func (*Adaptor) SetBoard Uses

func (c *Adaptor) SetBoard(n string) (err error)

SetBoard sets the name of the type of board

func (*Adaptor) SetName Uses

func (c *Adaptor) SetName(n string)

SetName sets the name of the Adaptor

Package chip imports 11 packages (graph). Updated 2017-07-15. Refresh now. Tools for package owners.