2014-06-09 19:01:53 -07:00
# I2C
2014-04-26 03:11:51 -07:00
2016-12-08 13:24:03 +01:00
This package provides drivers for [i2c ](https://en.wikipedia.org/wiki/I%C2%B2C )devices. It must be used along with an adaptor such as [firmata ](https://gobot.io/x/gobot/platforms/firmata ) that supports the needed interfaces for i2c devices.
2014-04-26 03:11:51 -07:00
## Getting Started
2014-06-09 19:01:53 -07:00
## Installing
```
2017-02-15 12:41:20 +01:00
go get -d -u gobot.io/x/gobot/...
2014-04-26 03:11:51 -07:00
```
2014-06-09 19:01:53 -07:00
2014-04-26 03:11:51 -07:00
## Hardware Support
Gobot has a extensible system for connecting to hardware devices. The following i2c devices are currently supported:
2017-01-03 10:22:06 +01:00
- Adafruit Motor Hat
2017-04-24 17:58:30 +02:00
- ADS1015 Analog to Digital Converter
2017-04-27 16:13:29 +02:00
- ADS1115 Analog to Digital Converter
2018-02-14 09:40:39 +01:00
- ADXL345 Digital Accelerometer
2018-01-12 16:26:21 +01:00
- BH1750 Digital Luminosity/Lux/Light Sensor
2017-01-03 10:22:06 +01:00
- BlinkM LED
2017-04-01 13:51:36 +02:00
- BME280 Barometric Pressure/Temperature/Altitude/Humidity Sensor
2017-01-03 10:22:06 +01:00
- BMP180 Barometric Pressure/Temperature/Altitude Sensor
2017-04-01 13:51:36 +02:00
- BMP280 Barometric Pressure/Temperature/Altitude Sensor
2017-02-24 08:19:20 +01:00
- DRV2605L Haptic Controller
2016-09-25 14:08:18 +02:00
- Grove Digital Accelerometer
2018-08-23 18:07:08 +02:00
- GrovePi Expansion Board
2016-09-25 14:08:18 +02:00
- Grove RGB LCD
- HMC6352 Compass
2017-05-05 09:27:08 +02:00
- INA3221 Voltage Monitor
2017-01-03 10:22:06 +01:00
- JHD1313M1 LCD Display w/RGB Backlight
- L3GD20H 3-Axis Gyroscope
2017-02-24 08:19:20 +01:00
- LIDAR-Lite
2016-09-25 14:08:18 +02:00
- MCP23017 Port Expander
- MMA7660 3-Axis Accelerometer
- MPL115A2 Barometer
2014-12-13 18:50:09 -08:00
- MPU6050 Accelerometer/Gyroscope
2017-06-23 20:18:02 +02:00
- PCA9685 16-channel 12-bit PWM/Servo Driver
2017-01-03 01:21:09 -08:00
- SHT3x-D Temperature/Humidity
2017-04-01 13:51:36 +02:00
- SSD1306 OLED Display Controller
2017-02-24 08:19:20 +01:00
- TSL2561 Digital Luminosity/Lux/Light Sensor
2014-04-26 03:11:51 -07:00
- Wii Nunchuck Controller
More drivers are coming soon...
2017-02-10 12:01:44 +01:00
## Using A Different Bus or Address
You can set a different I2C address or I2C bus than the default when initializing your I2C drivers by using optional parameters. Here is an example:
```go
blinkm := i2c.NewBlinkMDriver(e, i2c.WithBus(0), i2c.WithAddress(0x09))
```