Versions in this module Expand all Collapse all v1 v1.4.0 Apr 12, 2017 Changes in this version + type BME280Driver struct + func NewBME280Driver(c Connector, options ...func(Config)) *BME280Driver + func (d *BME280Driver) Humidity() (humidity float32, err error) + func (d *BME280Driver) Start() (err error) type BMP180Driver + Mode BMP180OversamplingMode + type BMP280Driver struct + func NewBMP280Driver(c Connector, options ...func(Config)) *BMP280Driver + func (d *BMP280Driver) Altitude() (alt float32, err error) + func (d *BMP280Driver) Connection() gobot.Connection + func (d *BMP280Driver) Halt() (err error) + func (d *BMP280Driver) Name() string + func (d *BMP280Driver) Pressure() (press float32, err error) + func (d *BMP280Driver) SetName(n string) + func (d *BMP280Driver) Start() (err error) + func (d *BMP280Driver) Temperature() (temp float32, err error) + type DisplayBuffer struct + Height int + Width int + func NewDisplayBuffer(Width, Height int) *DisplayBuffer + func (s *DisplayBuffer) Clear() + func (s *DisplayBuffer) Set(x, y, c int) + func (s *DisplayBuffer) Size() int + type SSD1306Driver struct + Buffer *DisplayBuffer + func NewSSD1306Driver(a Connector, options ...func(Config)) *SSD1306Driver + func (s *SSD1306Driver) Clear() (err error) + func (s *SSD1306Driver) Connection() gobot.Connection + func (s *SSD1306Driver) Display() (err error) + func (s *SSD1306Driver) Halt() (err error) + func (s *SSD1306Driver) Init() (err error) + func (s *SSD1306Driver) Name() string + func (s *SSD1306Driver) Off() (err error) + func (s *SSD1306Driver) On() (err error) + func (s *SSD1306Driver) Reset() (err error) + func (s *SSD1306Driver) Set(x, y, c int) + func (s *SSD1306Driver) SetContrast(contrast byte) (err error) + func (s *SSD1306Driver) SetName(n string) + func (s *SSD1306Driver) Start() (err error) type WiichuckDriver + func (w *WiichuckDriver) Joystick() map[string]float64 v1.3.0 Mar 22, 2017 Changes in this version + const DRV2605ModeAudioVibe + const DRV2605ModeAutocal + const DRV2605ModeDiagnose + const DRV2605ModeExtTrigEdge + const DRV2605ModeExtTrigLvl + const DRV2605ModeIntTrig + const DRV2605ModePWMAnalog + const DRV2605ModeRealtime + const TSL2561AddressFloat + const TSL2561AddressHigh + const TSL2561AddressLow + func WithTSL2561AutoGain(c Config) + func WithTSL2561Gain16X(c Config) + func WithTSL2561Gain1X(c Config) + func WithTSL2561IntegrationTime101MS(c Config) + func WithTSL2561IntegrationTime13MS(c Config) + func WithTSL2561IntegrationTime402MS(c Config) + type DRV2605LDriver struct + func NewDRV2605LDriver(conn Connector, options ...func(Config)) *DRV2605LDriver + func (d *DRV2605LDriver) Connection() gobot.Connection + func (d *DRV2605LDriver) GetPauseWaveform(delayTime10MS uint8) (pauseID uint8) + func (d *DRV2605LDriver) Go() (err error) + func (d *DRV2605LDriver) Halt() (err error) + func (d *DRV2605LDriver) Name() string + func (d *DRV2605LDriver) SelectLibrary(library uint8) (err error) + func (d *DRV2605LDriver) SetMode(newMode DRV2605Mode) (err error) + func (d *DRV2605LDriver) SetName(name string) + func (d *DRV2605LDriver) SetSequence(waveforms []uint8) (err error) + func (d *DRV2605LDriver) SetStandbyMode(standby bool) (err error) + func (d *DRV2605LDriver) Start() (err error) + type DRV2605Mode uint8 + type TSL2561Driver struct + func NewTSL2561Driver(conn Connector, options ...func(Config)) *TSL2561Driver + func (d *TSL2561Driver) CalculateLux(broadband uint16, ir uint16) (lux uint32) + func (d *TSL2561Driver) Connection() gobot.Connection + func (d *TSL2561Driver) GetLuminocity() (broadband uint16, ir uint16, err error) + func (d *TSL2561Driver) Halt() error + func (d *TSL2561Driver) Name() string + func (d *TSL2561Driver) SetGain(gain TSL2561Gain) error + func (d *TSL2561Driver) SetIntegrationTime(time TSL2561IntegrationTime) error + func (d *TSL2561Driver) SetName(name string) + func (d *TSL2561Driver) Start() (err error) + type TSL2561Gain int + const TSL2561Gain16X + const TSL2561Gain1X + type TSL2561IntegrationTime int + const TSL2561IntegrationTime101MS + const TSL2561IntegrationTime13MS + const TSL2561IntegrationTime402MS v1.2.1 Feb 16, 2017 v1.2.0 Feb 16, 2017 Changes in this version + const AddressNotInitialized + const BusNotInitialized + func NewConnection(bus sysfs.I2cDevice, address int) (connection *i2cConnection) + func WithAddress(address int) func(Config) + func WithBus(bus int) func(Config) + func WithMCP23017Bank(val uint8) func(Config) + func WithMCP23017Disslw(val uint8) func(Config) + func WithMCP23017Haen(val uint8) func(Config) + func WithMCP23017Intpol(val uint8) func(Config) + func WithMCP23017Mirror(val uint8) func(Config) + func WithMCP23017Odr(val uint8) func(Config) + func WithMCP23017Seqop(val uint8) func(Config) + type Config interface + GetAddressOrDefault func(def int) int + GetBusOrDefault func(def int) int + WithAddress func(address int) + WithBus func(bus int) + func NewConfig() Config + type Connection sysfs.I2cOperations + type Connector interface + GetConnection func(address int, bus int) (device Connection, err error) + GetDefaultBus func() int type MCP23017Driver + MCPConf MCP23017Config type MPU6050Driver + func (h *MPU6050Driver) GetData() (err error) v1.1.0 Jan 9, 2017 Changes in this version + const SHT3xAccuracyHigh + const SHT3xAccuracyLow + const SHT3xAccuracyMedium + const SHT3xAddressA + const SHT3xAddressB + var ErrInvalidAccuracy = errors.New("Invalid accuracy") + var ErrInvalidCrc = errors.New("Invalid crc") + var ErrInvalidTemp = errors.New("Invalid temperature units") + type BMP180Driver struct + func NewBMP180Driver(c I2c) *BMP180Driver + func (d *BMP180Driver) Connection() gobot.Connection + func (d *BMP180Driver) Halt() (err error) + func (d *BMP180Driver) Name() string + func (d *BMP180Driver) Pressure(mode BMP180OversamplingMode) (pressure float32, err error) + func (d *BMP180Driver) SetName(n string) + func (d *BMP180Driver) Start() (err error) + func (d *BMP180Driver) Temperature() (temp float32, err error) + type BMP180OversamplingMode uint + const BMP180HighResolution + const BMP180Standard + const BMP180UltraHighResolution + const BMP180UltraLowPower + type L3GD20HDriver struct + func NewL3GD20HDriver(c I2c) *L3GD20HDriver + func (d *L3GD20HDriver) Connection() gobot.Connection + func (d *L3GD20HDriver) Halt() (err error) + func (d *L3GD20HDriver) Name() string + func (d *L3GD20HDriver) Scale() L3GD20HScale + func (d *L3GD20HDriver) SetName(name string) + func (d *L3GD20HDriver) SetScale(s L3GD20HScale) + func (d *L3GD20HDriver) Start() (err error) + func (d *L3GD20HDriver) XYZ() (x float32, y float32, z float32, err error) + type L3GD20HScale byte + const L3GD20HScale2000dps + const L3GD20HScale250dps + const L3GD20HScale500dps + type SHT3xDriver struct + Units string + func NewSHT3xDriver(a I2c) *SHT3xDriver + func (s *SHT3xDriver) Accuracy() byte + func (s *SHT3xDriver) Connection() gobot.Connection + func (s *SHT3xDriver) Halt() (err error) + func (s *SHT3xDriver) Heater() (status bool, err error) + func (s *SHT3xDriver) Name() string + func (s *SHT3xDriver) Sample() (temp float32, rh float32, err error) + func (s *SHT3xDriver) SerialNumber() (sn uint32, err error) + func (s *SHT3xDriver) SetAccuracy(a byte) (err error) + func (s *SHT3xDriver) SetAddress(address int) + func (s *SHT3xDriver) SetHeater(enabled bool) (err error) + func (s *SHT3xDriver) SetName(n string) + func (s *SHT3xDriver) Start() (err error) v1.0.0 Dec 21, 2016 Changes in this version + const C + const Error + const Joystick + const LCD_2LINE + const LCD_2NDLINEOFFSET + const LCD_BLINKOFF + const LCD_BLINKON + const LCD_CLEARDISPLAY + const LCD_CMD + const LCD_CURSORMOVE + const LCD_CURSOROFF + const LCD_CURSORON + const LCD_CURSORSHIFT + const LCD_DATA + const LCD_DISPLAYCONTROL + const LCD_DISPLAYMOVE + const LCD_DISPLAYOFF + const LCD_DISPLAYON + const LCD_ENTRYLEFT + const LCD_ENTRYMODESET + const LCD_ENTRYRIGHT + const LCD_ENTRYSHIFTDECREMENT + const LCD_ENTRYSHIFTINCREMENT + const LCD_FUNCTIONSET + const LCD_MOVELEFT + const LCD_MOVERIGHT + const LCD_RETURNHOME + const LCD_SETCGRAMADDR + const LCD_SETDDRAMADDR + const MMA7660_ACTIVE + const MMA7660_AUTO_SLEEP_1 + const MMA7660_AUTO_SLEEP_120 + const MMA7660_AUTO_SLEEP_16 + const MMA7660_AUTO_SLEEP_2 + const MMA7660_AUTO_SLEEP_32 + const MMA7660_AUTO_SLEEP_4 + const MMA7660_AUTO_SLEEP_64 + const MMA7660_AUTO_SLEEP_8 + const MMA7660_INTSU + const MMA7660_MODE + const MMA7660_PD + const MMA7660_PDET + const MMA7660_SPCNT + const MMA7660_SR + const MMA7660_SRST + const MMA7660_STAND_BY + const MMA7660_TILT + const MMA7660_X + const MMA7660_Y + const MMA7660_Z + const MPL115A2_REGISTER_A0_COEFF_LSB + const MPL115A2_REGISTER_A0_COEFF_MSB + const MPL115A2_REGISTER_B1_COEFF_LSB + const MPL115A2_REGISTER_B1_COEFF_MSB + const MPL115A2_REGISTER_B2_COEFF_LSB + const MPL115A2_REGISTER_B2_COEFF_MSB + const MPL115A2_REGISTER_C12_COEFF_LSB + const MPL115A2_REGISTER_C12_COEFF_MSB + const MPL115A2_REGISTER_PRESSURE_LSB + const MPL115A2_REGISTER_PRESSURE_MSB + const MPL115A2_REGISTER_STARTCONVERSION + const MPL115A2_REGISTER_TEMP_LSB + const MPL115A2_REGISTER_TEMP_MSB + const MPU6050_ACCEL_FS_2 + const MPU6050_ACONFIG_AFS_SEL_BIT + const MPU6050_ACONFIG_AFS_SEL_LENGTH + const MPU6050_CLOCK_PLL_XGYRO + const MPU6050_GCONFIG_FS_SEL_BIT + const MPU6050_GCONFIG_FS_SEL_LENGTH + const MPU6050_GYRO_FS_250 + const MPU6050_PWR1_CLKSEL_BIT + const MPU6050_PWR1_CLKSEL_LENGTH + const MPU6050_PWR1_ENABLE_BIT + const MPU6050_PWR1_SLEEP_BIT + const MPU6050_RA_ACCEL_CONFIG + const MPU6050_RA_ACCEL_XOUT_H + const MPU6050_RA_GYRO_CONFIG + const MPU6050_RA_PWR_MGMT_1 + const REG_BLUE + const REG_GREEN + const REG_RED + const Z + var CustomLCDChars = map[string][8]byte + var ErrEncryptedBytes = errors.New("Encrypted bytes") + var ErrInvalidPosition = errors.New("Invalid position value") + var ErrNotEnoughBytes = errors.New("Not enough bytes read") + var ErrNotReady = errors.New("Device is not ready") + type AdafruitDirection int + const AdafruitBackward + const AdafruitForward + const AdafruitRelease + type AdafruitMotorHatDriver struct + func NewAdafruitMotorHatDriver(a I2c) *AdafruitMotorHatDriver + func (a *AdafruitMotorHatDriver) Connection() gobot.Connection + func (a *AdafruitMotorHatDriver) Halt() (err error) + func (a *AdafruitMotorHatDriver) Name() string + func (a *AdafruitMotorHatDriver) RunDCMotor(dcMotor int, dir AdafruitDirection) (err error) + func (a *AdafruitMotorHatDriver) SetDCMotorSpeed(dcMotor int, speed int32) (err error) + func (a *AdafruitMotorHatDriver) SetMotorHatAddress(addr int) (err error) + func (a *AdafruitMotorHatDriver) SetName(n string) + func (a *AdafruitMotorHatDriver) SetServoHatAddress(addr int) (err error) + func (a *AdafruitMotorHatDriver) SetServoMotorFreq(freq float64) (err error) + func (a *AdafruitMotorHatDriver) SetServoMotorPulse(channel byte, on, off int32) (err error) + func (a *AdafruitMotorHatDriver) SetStepperMotorSpeed(stepperMotor int, rpm int) (err error) + func (a *AdafruitMotorHatDriver) Start() (err error) + func (a *AdafruitMotorHatDriver) Step(motor, steps int, dir AdafruitDirection, style AdafruitStepStyle) (err error) + type AdafruitStepStyle int + const AdafruitDouble + const AdafruitInterleave + const AdafruitMicrostep + const AdafruitSingle + type BlinkMDriver struct + func NewBlinkMDriver(a I2c) *BlinkMDriver + func (b *BlinkMDriver) Color() (color []byte, err error) + func (b *BlinkMDriver) Connection() gobot.Connection + func (b *BlinkMDriver) Fade(red byte, green byte, blue byte) (err error) + func (b *BlinkMDriver) FirmwareVersion() (version string, err error) + func (b *BlinkMDriver) Halt() (err error) + func (b *BlinkMDriver) Name() string + func (b *BlinkMDriver) Rgb(red byte, green byte, blue byte) (err error) + func (b *BlinkMDriver) SetName(n string) + func (b *BlinkMDriver) Start() (err error) + type GroveAccelerometerDriver struct + func NewGroveAccelerometerDriver(a I2c) *GroveAccelerometerDriver + type GroveLcdDriver struct + func NewGroveLcdDriver(a I2c) *GroveLcdDriver + type HMC6352Driver struct + func NewHMC6352Driver(a I2c) *HMC6352Driver + func (h *HMC6352Driver) Connection() gobot.Connection + func (h *HMC6352Driver) Halt() (err error) + func (h *HMC6352Driver) Heading() (heading uint16, err error) + func (h *HMC6352Driver) Name() string + func (h *HMC6352Driver) SetName(n string) + func (h *HMC6352Driver) Start() (err error) + type I2c interface + type I2cReader interface + I2cRead func(address int, len int) (data []byte, err error) + type I2cStarter interface + I2cStart func(address int) (err error) + type I2cWriter interface + I2cWrite func(address int, buf []byte) (err error) + type JHD1313M1Driver struct + func NewJHD1313M1Driver(a I2c) *JHD1313M1Driver + func (h *JHD1313M1Driver) Clear() error + func (h *JHD1313M1Driver) Connection() gobot.Connection + func (h *JHD1313M1Driver) Halt() error + func (h *JHD1313M1Driver) Home() error + func (h *JHD1313M1Driver) Name() string + func (h *JHD1313M1Driver) Scroll(leftToRight bool) error + func (h *JHD1313M1Driver) SetCustomChar(pos int, charMap [8]byte) error + func (h *JHD1313M1Driver) SetName(n string) + func (h *JHD1313M1Driver) SetPosition(pos int) (err error) + func (h *JHD1313M1Driver) SetRGB(r, g, b int) error + func (h *JHD1313M1Driver) Start() error + func (h *JHD1313M1Driver) Write(message string) error + type LIDARLiteDriver struct + func NewLIDARLiteDriver(a I2c) *LIDARLiteDriver + func (h *LIDARLiteDriver) Connection() gobot.Connection + func (h *LIDARLiteDriver) Distance() (distance int, err error) + func (h *LIDARLiteDriver) Halt() (err error) + func (h *LIDARLiteDriver) Name() string + func (h *LIDARLiteDriver) SetName(n string) + func (h *LIDARLiteDriver) Start() (err error) + type MCP23017Config struct + Bank uint8 + Disslw uint8 + Haen uint8 + Intpol uint8 + Mirror uint8 + Odr uint8 + Seqop uint8 + func (mc *MCP23017Config) GetUint8Value() uint8 + type MCP23017Driver struct + func NewMCP23017Driver(a I2c, conf MCP23017Config, deviceAddress int, v ...time.Duration) *MCP23017Driver + func (m *MCP23017Driver) Connection() gobot.Connection + func (m *MCP23017Driver) Halt() (err error) + func (m *MCP23017Driver) Name() string + func (m *MCP23017Driver) PinMode(pin, val uint8, portStr string) (err error) + func (m *MCP23017Driver) ReadGPIO(pin uint8, portStr string) (val uint8, err error) + func (m *MCP23017Driver) SetGPIOPolarity(pin uint8, val uint8, portStr string) (err error) + func (m *MCP23017Driver) SetName(n string) + func (m *MCP23017Driver) SetPullUp(pin uint8, val uint8, portStr string) error + func (m *MCP23017Driver) Start() (errs error) + func (m *MCP23017Driver) WriteGPIO(pin uint8, val uint8, portStr string) (err error) + type MMA7660Driver struct + func NewMMA7660Driver(a I2c) *MMA7660Driver + func (h *MMA7660Driver) Acceleration(x, y, z float64) (ax, ay, az float64) + func (h *MMA7660Driver) Connection() gobot.Connection + func (h *MMA7660Driver) Halt() (err error) + func (h *MMA7660Driver) Name() string + func (h *MMA7660Driver) SetName(n string) + func (h *MMA7660Driver) Start() (err error) + func (h *MMA7660Driver) XYZ() (x float64, y float64, z float64, err error) + type MPL115A2Driver struct + A0 float32 + B1 float32 + B2 float32 + C12 float32 + Pressure float32 + Temperature float32 + func NewMPL115A2Driver(a I2c, v ...time.Duration) *MPL115A2Driver + func (h *MPL115A2Driver) Connection() gobot.Connection + func (h *MPL115A2Driver) Halt() (err error) + func (h *MPL115A2Driver) Name() string + func (h *MPL115A2Driver) SetName(n string) + func (h *MPL115A2Driver) Start() (err error) + type MPU6050Driver struct + Accelerometer ThreeDData + Gyroscope ThreeDData + Temperature int16 + func NewMPU6050Driver(a I2c, v ...time.Duration) *MPU6050Driver + func (h *MPU6050Driver) Connection() gobot.Connection + func (h *MPU6050Driver) Halt() (err error) + func (h *MPU6050Driver) Name() string + func (h *MPU6050Driver) SetName(n string) + func (h *MPU6050Driver) Start() (err error) + type ThreeDData struct + X int16 + Y int16 + Z int16 + type WiichuckDriver struct + func NewWiichuckDriver(a I2c, v ...time.Duration) *WiichuckDriver + func (w *WiichuckDriver) Connection() gobot.Connection + func (w *WiichuckDriver) Halt() (err error) + func (w *WiichuckDriver) Name() string + func (w *WiichuckDriver) SetName(n string) + func (w *WiichuckDriver) Start() (errs error)