Arduino Mini 05 I2C

hi there guys. i have just started using the Arduino Mini 05 and am trying to find more information regarding the I2C interface.
From what i saw the Wire.h lib automatically handles the IO. but as far as my testing is going i am not able to get the I2C interface operational.

i am trying to interface to an MCP23016 16bit IIC bus expander.
has anyone managed to get this working and if you don’t mind how?

#include <Wire.h>
const int LED = 13;

void setup() {
  
  pinMode(LED, OUTPUT);
  Wire.begin();
  Wire.beginTransmission(0x40);
  Wire.write(0x06);
  Wire.write(0x00);
  Wire.endTransmission(); 
  
  
}


void loop() {
    digitalWrite(LED, HIGH);
    delay(1000);
    digitalWrite(LED, LOW);
  
 
  delay(1000);
  
  Wire.beginTransmission(0x40);
  Wire.write(0x00);
  Wire.write(0xFF);
  Wire.endTransmission();
  
}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

  Wire.beginTransmission(0x40);

The 7-bit address of a standard MCP23016 (all address pins grounded) is 0x20 and not 0x40.