Use of MCP23017: No I2C devices found

Moderators: Voyager, BertB, Stuntteam, LisaM

Post Reply
Message
Author
kbup
Normal user
Posts: 1
Joined: 05 Oct 2018, 00:27

Use of MCP23017: No I2C devices found

#1 Post by kbup » 05 Oct 2018, 00:43

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,

LisaM
Normal user
Posts: 494
Joined: 11 Apr 2017, 18:29

Re: Use of MCP23017: No I2C devices found

#2 Post by LisaM » 07 Oct 2018, 21:12

Did you put your message in the right forum? This is the upyeasy forum and not the espeasy forum. ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest