I’m trying to interface my Photon ( firmware 0.6.0-rc2 prerelease and 0.5.3) with a 24AA32A E2PROM using I2C. I’m having a hard time sending data over with I2C. It seems I haven’t configured the bus correctly.
So I’ve set up a minimal code example to simplify:
void setup() {
Wire.setSpeed(CLOCK_SPEED_100KHZ);
Wire.begin();
}
void loop() {
Wire.beginTransmission(3); // transmit to slave device #3
if( Wire.endTransmission() != 0 ){
Wire.begin() ; /* re-init the i2c */
}
delay(2000);
}
This is what I’m seeing with my oscilloscope:
So although I’m sending a 3, the oscilloscope decodes it as a 6.
What could be the problem? I’m using 4.7kOhm pullups to VDD.