ADS1115
The ADS1115 16-bit Analog to Digital Converter (ADC) allows user to read analog voltages via i2c interface
API ReferenceHow To Connect
Install the package with: go get gobot.io/x/gobot
You must pass in an Adaptor that supports the i2c.Connector
interface to use with this Driver.
You can use the following optional params if you wish to change the I2C Bus and I2C Address from the default values.
i2c.WithBus(int)
: bus to use with this driver.
i2c.WithAddress(int)
: address to use with this driver
// default bus/address bpm180 := i2c.NewADS1115Driver(adaptor) // optional bus/address bpm180 := i2c.NewADS1115Driver(adaptor, i2c.WithBus(0), i2c.WithAddress(0x34))
How To Use
Example using a ADS1115 ADC.
// code here