For my project I need more digital and analog pins but I have laying around pin expander IC's I want to use them for it. I've got 1 MCP23016 wich is a digital expander and 1 MCP3008 wich is a analog expander. Using other arduino boards is not an option for me. If this is not possible I maybe can use 2 leonardo's but i first want to see if this is possible to use the expanders. Also I want to use an LCD 16*2 screen in I2C on my leonardo. Please make a schematic for me how I need to put it togheter.
Sorry that it isn't and pin expander on the site where I bought it it says so but if I like in the datasheet you are correct I need atleast 4 analog pins (without the I2C connection) and about the digital pins i think with the IC I have euneugh
s it possible to use an I2C LCD display with the digital pin expander
Yes.
The MCP23016 is an I2C device, just connect it to the same wires as your I2C LCD display. The I2C lines are a bus and can have 127 devices connected to it, each device should have a different address. You can select the MCP23016's address on the I2C bus by three logic level inputs. Just connect these to 5V or ground to select your address to avoid the address of the display. See the data sheet for details. Chances are that they don't clash anyway.