As a christmas present I bought myself some MCP23017's (among other things) but I can't get it working. I am new to i2c in general; so i am probably making a simple mistake. I have been following this tutorial over at tronixstuff
Here is a picture of my wiring; since this picture was taken I've added two pull up resistors (2.2o) from both SDA and SCL to the reset pin which is tied to 5v. As well I have ensured that the LED works.
As well, this is the code which I am running on my Teensy2:
#include <Wire.h>
void setup(){
Wire.begin();
delay(100);
Wire.beginTransmission(0x20);
Wire.write(0x00);
Wire.write(0x00);
Wire.endTransmission();
delay(100);
Wire.beginTransmission(0x20);
Wire.write(0x12);
Wire.write(11111111);
Wire.endTransmission();
}
void loop(){
}
So any idea's? I'm pretty stuck here. Thanks!
Michael