Go Down

Topic: I2C read problems (Read 6 times) previous topic - next topic


as before i changed the

#define BUFFER_LENGTH 128

into wire.h


  #define TWI_BUFFER_LENGTH 128

into twi.h

from 32 to 128

Nick Gammon

I changed both of those, and ran this sketch:

Code: [Select]
#include <Wire.h>

void setup ()
  Wire.begin ();

void loop () 
  Wire.beginTransmission (25);
  Wire.write ("AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789000987654321");
  Wire.endTransmission ();
  delay (1000);

All the bytes were sent (I could see with the logic analyzer). I also had to recompile and re-upload the receiving Arduino as well.



also the slave is a custom board
and i am using Arduino Pro at 8Mhz because Atmega328 on a breadboard isnt working any more on Arduino 1.0


Go Up