I am using a MCP23017 with my Nodemcu Board v2 and ESPEasy (Mega #1825). When I run an I2C scan, I get the message "No I2C devices found".
But my MCP23017 works well when I upload this sketch from Arduino IDE and is right detected with the Arduino i2C scan:
Code: Select all
#include "Adafruit_MCP23017.h"
// Instance of MCP23017 library
Adafruit_MCP23017 mcp;
void setup() {
// Initialize the MCP23017
mcp.begin();
// Define GPA0 (physical pin 21) as output pin
mcp.pinMode(0, OUTPUT);
}
void loop() {
delay(100);
// Switch LED on
mcp.digitalWrite(0, HIGH);
delay(100);
// Switch LED off
mcp.digitalWrite(0, LOW);
}
I2C Interface
GPIO ⇿ SDA: GPIO-4 (D2)
GPIO ⇾ SCL: GPIO-5 (D1)
All the GPIO boot states are set to default.
Do you know why the MCP23017 is not detected?
Thanks in advance for your reply.
Regards,