Arduino does not find MCP23017 via I2C

I'm trying to connect a MCP23017 to an Arduino via I2C but it doesen't work. There is the example code I'm trying to run.

// Blinks an LED attached to a MCP23XXX pin.

#include <Adafruit_MCP23X17.h>

#define LED_PIN 0     // MCP23XXX pin LED is attached to

Adafruit_MCP23X17 mcp;

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("MCP23xxx Blink Test!");

  // uncomment appropriate mcp.begin
  if (!mcp.begin_I2C()) {
    Serial.println("Error.");
    while (1);
  }

  // configure pin for output
  mcp.pinMode(LED_PIN, OUTPUT);

  Serial.println("Looping...");
}

void loop() {
  mcp.digitalWrite(LED_PIN, HIGH);
  delay(500);
  mcp.digitalWrite(LED_PIN, LOW);
  delay(500);
}

And here is my setup. I'm trying to connect a Arduino Micro.



And I also tested with Arduino Uno and a second MCP23017 (both are: https://www.waveshare.com/mcp23017-io-expansion-board.htm)

In both cases the PWR on the MCP light up, so they have the needed voltage. And in both cases I get

MCP23xxx Blink Test!
Error.

in the serial monitor.

Can some one spot a mistake in the code or the set up? I took the code directly from the example folder of the "Adafruit_MCP23017_Arduino_Library"

With i2c problems, the first thing to try is the i2c scanner code from the examples menu of the IDE. If that detects nothing, there is no point trying any other code.

14:15:57.828 -> Scanning...
14:15:57.828 -> I2C device found at address 0x27 !
14:15:57.828 -> done
14:15:57.828 ->

That is what I get when running the scanner.

@akut

And where did you use that address 0x27 or 39 decimal in your sketch?

try this change: if (!mcp.begin_I2C(0x27)) {

I found my mistake. I thought that the adress would be 0x20, which looked like the standard in all example codes that I could find. But since I have NOT shorten A0,A1,A2 to GND they are all set to HIGH, making the adress 0x27.

  if (!mcp.begin_I2C(0x27)) {

This works now. Thanks for the hint

Then you need specify 0x27 as mcp.begin_I2C(0x27), because the default I2C address is 0x20.