Documentation ¶
Overview ¶
Package edison contains the Gobot adaptor for the Intel Edison.
For further information refer to intel-iot README: https://github.com/hybridgroup/gobot/blob/master/platforms/intel-iot/edison/README.md
Index ¶
- type EdisonAdaptor
- func (e *EdisonAdaptor) AnalogRead(pin string) (val int, err error)
- func (e *EdisonAdaptor) Connect() (errs []error)
- func (e *EdisonAdaptor) DigitalRead(pin string) (i int, err error)
- func (e *EdisonAdaptor) DigitalWrite(pin string, val byte) (err error)
- func (e *EdisonAdaptor) Finalize() (errs []error)
- func (e *EdisonAdaptor) I2cRead(size uint) (data []byte, err error)
- func (e *EdisonAdaptor) I2cStart(address byte) (err error)
- func (e *EdisonAdaptor) I2cWrite(data []byte) (err error)
- func (e *EdisonAdaptor) Name() string
- func (e *EdisonAdaptor) PwmWrite(pin string, val byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdisonAdaptor ¶
type EdisonAdaptor struct {
// contains filtered or unexported fields
}
func NewEdisonAdaptor ¶
func NewEdisonAdaptor(name string) *EdisonAdaptor
NewEditionAdaptor creates a EdisonAdaptor with specified name and creates connect function
func (*EdisonAdaptor) AnalogRead ¶
func (e *EdisonAdaptor) AnalogRead(pin string) (val int, err error)
AnalogRead returns value from analog reading of specified pin
func (*EdisonAdaptor) Connect ¶
func (e *EdisonAdaptor) Connect() (errs []error)
Connect starts conection with board and creates digitalPins and pwmPins adaptor maps
func (*EdisonAdaptor) DigitalRead ¶
func (e *EdisonAdaptor) DigitalRead(pin string) (i int, err error)
DigitalRead reads digital value from pin
func (*EdisonAdaptor) DigitalWrite ¶
func (e *EdisonAdaptor) DigitalWrite(pin string, val byte) (err error)
DigitalWrite writes digital value to specified pin
func (*EdisonAdaptor) Finalize ¶
func (e *EdisonAdaptor) Finalize() (errs []error)
Finalize closes connection to board and pins
func (*EdisonAdaptor) I2cRead ¶
func (e *EdisonAdaptor) I2cRead(size uint) (data []byte, err error)
I2cRead reads data from i2cDevice
func (*EdisonAdaptor) I2cStart ¶
func (e *EdisonAdaptor) I2cStart(address byte) (err error)
I2cStart initializes i2c device for addresss
func (*EdisonAdaptor) I2cWrite ¶
func (e *EdisonAdaptor) I2cWrite(data []byte) (err error)
I2cWrite writes data to i2cDevice
func (*EdisonAdaptor) Name ¶
func (e *EdisonAdaptor) Name() string