Hi,
Im trying to connect Arduino with pcf8574 thru i2c. After many hours of tinkering I discovered, that Arduino is probably not sending any signal to wires a4/a5. Unfortunately, I have no oscilloscope or so, but my voltmeter show exact +5V on a5 wire and 0V on a4. I know it cannot be exact, but from my understanding of i2c protocol I expected values something between 0 and 5V on my voltmeter.
There is my code, which should switch on and off LED on pcf8574's pin 0 (address wires on PCF are connected to zero, so address should be B0100000).
#include <Wire.h>
void setup()
{
Wire.begin();
}
void loop()
{
Wire.beginTransmission(B0100000);
delay(70);
Wire.send(1);
delay(200);
Wire.send(0);
delay(200);
Wire.endTransmission();
}
I will be very happy if somebody find something bad on my code, because I really tested everything and without any success.
Thanks a lot,
Marek