1.2 KiB
1.2 KiB
I2C
This package provides drivers for i2cdevices. It must be used along with an adaptor such as firmata that supports the needed interfaces for i2c devices.
Getting Started
Installing
go get -d -u gobot.io/x/gobot/... && go install gobot.io/x/gobot/platforms/i2c
Hardware Support
Gobot has a extensible system for connecting to hardware devices. The following i2c devices are currently supported:
- Adafruit Motor Hat
- BlinkM LED
- BMP180 Barometric Pressure/Temperature/Altitude Sensor
- Grove Digital Accelerometer
- Grove RGB LCD
- HMC6352 Compass
- JHD1313M1 LCD Display w/RGB Backlight
- LIDAR-Lite
- L3GD20H 3-Axis Gyroscope
- MCP23017 Port Expander
- MMA7660 3-Axis Accelerometer
- MPL115A2 Barometer
- MPU6050 Accelerometer/Gyroscope
- SHT3x-D Temperature/Humidity
- Wii Nunchuck Controller
More drivers are coming soon...
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:
blinkm := i2c.NewBlinkMDriver(e, i2c.WithBus(0), i2c.WithAddress(0x09))