Documentation ¶
Overview ¶
Package raspi contains the Gobot adaptor for the Raspberry Pi.
For further information refer to raspi README: https://github.com/hybridgroup/gobot/blob/master/platforms/raspi/README.md
Index ¶
- type Adaptor
- func (r *Adaptor) Connect() (err error)
- func (r *Adaptor) DigitalRead(pin string) (val int, err error)
- func (r *Adaptor) DigitalWrite(pin string, val byte) (err error)
- func (r *Adaptor) Finalize() (err error)
- func (r *Adaptor) GetConnection(address int, bus int) (connection i2c.Connection, err error)
- func (r *Adaptor) GetDefaultBus() int
- func (r *Adaptor) Name() string
- func (r *Adaptor) PwmWrite(pin string, val byte) (err error)
- func (r *Adaptor) ServoWrite(pin string, angle byte) (err error)
- func (r *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 is the Gobot Adaptor for the Raspberry Pi
func (*Adaptor) Connect ¶ added in v1.0.0
Connect starts connection with board and creates digitalPins and pwmPins adaptor maps
func (*Adaptor) DigitalRead ¶ added in v1.0.0
DigitalRead reads digital value from pin
func (*Adaptor) DigitalWrite ¶ added in v1.0.0
DigitalWrite writes digital value to specified pin
func (*Adaptor) GetConnection ¶ added in v1.2.0
GetConnection returns an i2c 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 ¶ added in v1.2.0
GetDefaultBus returns the default i2c bus for this platform
func (*Adaptor) ServoWrite ¶ added in v1.0.0
ServoWrite writes a servo signal to the specified pin