Hello
Error msg = Failed to communicate. Check wiring and address of SX1509.
Thanks in advance
My source code
#include <Wire.h> // I2C library
#include <SparkFunSX1509.h> // http://librarymanager/All#SparkFun_SX1509
#define I2C_SDA 2
#define I2C_SCL 4
TwoWire I2CSX = TwoWire(0);
SX1509 io;
void setup() {
Serial.begin(115200);
Serial.println(“GL1-SX1509”);
I2CSX.begin(I2C_SDA, I2C_SCL);
if (io.begin(0x3E) == false)
{
Serial.println(“Failed to communicate. Check wiring and address of SX1509.”);
while (1);
}
io.pinMode(1,OUTPUT);
}
void loop() {
io.digitalWrite(1,1); delay(2000);
io.digitalWrite(1,0); delay(2000);
}