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

package tinkerboard

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

Package tinkerboard contains the Gobot adaptor for the ASUS Tinker Board.

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


Package Files

adaptor.go doc.go pin_map.go

type Adaptor Uses

type Adaptor struct {
    // contains filtered or unexported fields

Adaptor represents a Gobot Adaptor for the ASUS Tinker Board

func NewAdaptor Uses

func NewAdaptor() *Adaptor

NewAdaptor creates a Tinkerboard 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.

func (*Adaptor) DigitalWrite Uses

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

DigitalWrite writes digital value to the specified pin.

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..1] which corresponds to /dev/i2c-0 through /dev/i2c-1.

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

func (c *Adaptor) SetName(n string)

SetName sets the name of the Adaptor

Package tinkerboard imports 7 packages (graph). Updated 2018-02-17. Refresh now. Tools for package owners.