Help porting a nano project to a mega 2560

I'm very unfamiliar with Arduino, and I'm just trying to port over a project meant for a nano to a mega 2560. The line that's killing me is:

#include "Adafruit_MCP23017.h"

then later the line:

Adafruit_MCP23017 io;

How do I find the equivalent to this for my pro mega?

How do I find the equivalent to this for my pro mega?

Does the program compile with the target board set to be a nano ? If so then you have the Adafruit_MCP23017 library correctly installed. If not then you will need to download and install the library.

You have not posted the code that you are using, but if it works with a nano then it should work with the Mega.

In addition to the previous reply: You may need pay attention to the pins for I2C connection (if applicable):

Nano: SDA pin = A4 SCL pin = A5

If you are using an Arduino Mega, SDA is pin 20 and SCL is 21