diff --git a/src/ayab/solenoids.cpp b/src/ayab/solenoids.cpp index cbc7b0ec..b7bb7f31 100644 --- a/src/ayab/solenoids.cpp +++ b/src/ayab/solenoids.cpp @@ -30,8 +30,8 @@ */ void Solenoids::init() { #ifdef HAS_MCP23008 - mcp_0.begin(I2Caddr_sol1_8); - mcp_1.begin(I2Caddr_sol9_16); + mcp_0.begin_I2C(I2Caddr_sol1_8); + mcp_1.begin_I2C(I2Caddr_sol9_16); for (uint8_t i = 0; i < SOLENOID_BUFFER_SIZE / 2; i++) { mcp_0.pinMode(i, OUTPUT); diff --git a/src/ayab/solenoids.h b/src/ayab/solenoids.h index 5a8aa062..74c148c7 100644 --- a/src/ayab/solenoids.h +++ b/src/ayab/solenoids.h @@ -27,7 +27,7 @@ #include "board.h" #include "encoders.h" #include -#include +#include #include #include @@ -86,8 +86,8 @@ class Solenoids : public SolenoidsInterface { void write(uint16_t state); #if defined(HAS_MCP23008) - Adafruit_MCP23008 mcp_0 = Adafruit_MCP23008(); - Adafruit_MCP23008 mcp_1 = Adafruit_MCP23008(); + Adafruit_MCP23X08 mcp_0 = Adafruit_MCP23X08(); + Adafruit_MCP23X08 mcp_1 = Adafruit_MCP23X08(); #elif defined(HAS_MCP23017) Adafruit_MCP23X17 mcp = Adafruit_MCP23X17(); #endif