Documentation ¶
Overview ¶
Package joule contains the Gobot adaptor for the Intel Joule.
For further information refer to intel-iot README: https://github.com/hybridgroup/gobot/blob/master/platforms/intel-iot/joule/README.md
TODO: move this into shared PWM package
Index ¶
- type JouleAdaptor
- func (e *JouleAdaptor) Connect() (errs []error)
- func (e *JouleAdaptor) DigitalRead(pin string) (i int, err error)
- func (e *JouleAdaptor) DigitalWrite(pin string, val byte) (err error)
- func (e *JouleAdaptor) Finalize() (errs []error)
- func (e *JouleAdaptor) I2cRead(address int, size int) (data []byte, err error)
- func (e *JouleAdaptor) I2cStart(address int) (err error)
- func (e *JouleAdaptor) I2cWrite(address int, data []byte) (err error)
- func (e *JouleAdaptor) Name() string
- func (e *JouleAdaptor) PwmWrite(pin string, val byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JouleAdaptor ¶
type JouleAdaptor struct {
// contains filtered or unexported fields
}
JouleAdaptor represents an Intel Joule
func NewJouleAdaptor ¶
func NewJouleAdaptor(name string) *JouleAdaptor
NewJouleAdaptor returns a new JouleAdaptor with specified name
func (*JouleAdaptor) Connect ¶
func (e *JouleAdaptor) Connect() (errs []error)
Connect initializes the Joule for use with the Arduino beakout board
func (*JouleAdaptor) DigitalRead ¶
func (e *JouleAdaptor) DigitalRead(pin string) (i int, err error)
DigitalRead reads digital value from pin
func (*JouleAdaptor) DigitalWrite ¶
func (e *JouleAdaptor) DigitalWrite(pin string, val byte) (err error)
DigitalWrite writes a value to the pin. Acceptable values are 1 or 0.
func (*JouleAdaptor) Finalize ¶
func (e *JouleAdaptor) Finalize() (errs []error)
Finalize releases all i2c devices and exported digital and pwm pins.
func (*JouleAdaptor) I2cRead ¶
func (e *JouleAdaptor) I2cRead(address int, size int) (data []byte, err error)
I2cRead returns size bytes from the i2c device
func (*JouleAdaptor) I2cStart ¶
func (e *JouleAdaptor) I2cStart(address int) (err error)
I2cStart initializes i2c device for addresss
func (*JouleAdaptor) I2cWrite ¶
func (e *JouleAdaptor) I2cWrite(address int, data []byte) (err error)
I2cWrite writes data to i2c device
func (*JouleAdaptor) Name ¶
func (e *JouleAdaptor) Name() string
Name returns the JouleAdaptors name