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 RaspiAdaptor
- func (r *RaspiAdaptor) Connect() (errs []error)
- func (r *RaspiAdaptor) DigitalRead(pin string) (val int, err error)
- func (r *RaspiAdaptor) DigitalWrite(pin string, val byte) (err error)
- func (r *RaspiAdaptor) Finalize() (errs []error)
- func (r *RaspiAdaptor) I2cRead(address int, size int) (data []byte, err error)
- func (r *RaspiAdaptor) I2cStart(address int) (err error)
- func (r *RaspiAdaptor) I2cWrite(address int, data []byte) (err error)
- func (r *RaspiAdaptor) Name() string
- func (r *RaspiAdaptor) PwmWrite(pin string, val byte) (err error)
- func (r *RaspiAdaptor) ServoWrite(pin string, angle byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RaspiAdaptor ¶
type RaspiAdaptor struct {
// contains filtered or unexported fields
}
func NewRaspiAdaptor ¶
func NewRaspiAdaptor(name string) *RaspiAdaptor
NewRaspiAdaptor creates a RaspiAdaptor with specified name and
func (*RaspiAdaptor) Connect ¶
func (r *RaspiAdaptor) Connect() (errs []error)
Connect starts connection with board and creates digitalPins and pwmPins adaptor maps
func (*RaspiAdaptor) DigitalRead ¶
func (r *RaspiAdaptor) DigitalRead(pin string) (val int, err error)
DigitalRead reads digital value from pin
func (*RaspiAdaptor) DigitalWrite ¶
func (r *RaspiAdaptor) DigitalWrite(pin string, val byte) (err error)
DigitalWrite writes digital value to specified pin
func (*RaspiAdaptor) Finalize ¶
func (r *RaspiAdaptor) Finalize() (errs []error)
Finalize closes connection to board and pins
func (*RaspiAdaptor) I2cRead ¶
func (r *RaspiAdaptor) I2cRead(address int, size int) (data []byte, err error)
I2cRead returns value from i2c device using specified size
func (*RaspiAdaptor) I2cStart ¶
func (r *RaspiAdaptor) I2cStart(address int) (err error)
I2cStart starts a i2c device in specified address
func (*RaspiAdaptor) I2cWrite ¶
func (r *RaspiAdaptor) I2cWrite(address int, data []byte) (err error)
I2CWrite writes data to i2c device
func (*RaspiAdaptor) Name ¶
func (r *RaspiAdaptor) Name() string
func (*RaspiAdaptor) ServoWrite ¶
func (r *RaspiAdaptor) ServoWrite(pin string, angle byte) (err error)
Click to show internal directories.
Click to hide internal directories.