Page 1 of 1

Use of MCP23017: No I2C devices found

Posted: 05 Oct 2018, 00:43
by kbup
Hello,

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);
}
In the Hardware section, I use the following configuration:
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,

Re: Use of MCP23017: No I2C devices found

Posted: 07 Oct 2018, 21:12
by LisaM
Did you put your message in the right forum? This is the upyeasy forum and not the espeasy forum. ;)