diff --git a/drivers/i2c/grovepi_driver.go b/drivers/i2c/grovepi_driver.go index 4802cb01..997f2fd2 100644 --- a/drivers/i2c/grovepi_driver.go +++ b/drivers/i2c/grovepi_driver.go @@ -80,6 +80,16 @@ func (d *GrovePiDriver) Start() (err error) { // Halt returns true if devices is halted successfully func (d *GrovePiDriver) Halt() (err error) { return } +// Connect is here to implement the Adaptor interface. +func (d *GrovePiDriver) Connect() (err error) { + return +} + +// Finalize is here to implement the Adaptor interface. +func (d *GrovePiDriver) Finalize() (err error) { + return +} + // AnalogRead returns value from analog pin implementing the AnalogReader interface. func (d *GrovePiDriver) AnalogRead(pin string) (value int, err error) { pin = getPin(pin) diff --git a/drivers/i2c/grovepi_driver_test.go b/drivers/i2c/grovepi_driver_test.go index a06b6094..a83a90c7 100644 --- a/drivers/i2c/grovepi_driver_test.go +++ b/drivers/i2c/grovepi_driver_test.go @@ -21,6 +21,9 @@ var _ gpio.DigitalWriter = (*GrovePiDriver)(nil) // must implement the AnalogReader interface var _ aio.AnalogReader = (*GrovePiDriver)(nil) +// must implement the Adaptor interface +var _ gobot.Adaptor = (*GrovePiDriver)(nil) + func initTestGrovePiDriver() (driver *GrovePiDriver) { driver, _ = initGrovePiDriverWithStubbedAdaptor() return