Skip to main content
added 309 characters in body
Source Link
Hoytman
  • 747
  • 5
  • 13
  • 27

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

  Wire.beginTransmission(4); // transmit to device #4
  
  for(int i = 0; i < 20; i ++){
    char rand = random(65, 100);
    Wire.write(rand); 
  }
   
  Wire.endTransmission();    // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble.

I read this here: http://arduino.cc/en/Tutorial/MasterReader

Arduino 1, the Master, is programmed to request, and then read, 6 bytes of data sent from the uniquely addressed Slave Arduino.

Now that I look at this again (after reading the responses) I think that the limit was set in the code sample.

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

  Wire.beginTransmission(4); // transmit to device #4
  
  for(int i = 0; i < 20; i ++){
    char rand = random(65, 100);
    Wire.write(rand); 
  }
   
  Wire.endTransmission();    // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

  Wire.beginTransmission(4); // transmit to device #4
  
  for(int i = 0; i < 20; i ++){
    char rand = random(65, 100);
    Wire.write(rand); 
  }
   
  Wire.endTransmission();    // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble.

I read this here: http://arduino.cc/en/Tutorial/MasterReader

Arduino 1, the Master, is programmed to request, and then read, 6 bytes of data sent from the uniquely addressed Slave Arduino.

Now that I look at this again (after reading the responses) I think that the limit was set in the code sample.

added 33 characters in body
Source Link
Gerben
  • 11.3k
  • 3
  • 22
  • 34

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

Wire.beginTransmission(4); // transmit to device #4

for(int i = 0; i < 20; i ++){ char rand = random(65, 100); Wire.write(rand); }

Wire.endTransmission(); // stop transmitting

  Wire.beginTransmission(4); // transmit to device #4
  
  for(int i = 0; i < 20; i ++){
    char rand = random(65, 100);
    Wire.write(rand); 
  }
   
  Wire.endTransmission();    // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

Wire.beginTransmission(4); // transmit to device #4

for(int i = 0; i < 20; i ++){ char rand = random(65, 100); Wire.write(rand); }

Wire.endTransmission(); // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

  Wire.beginTransmission(4); // transmit to device #4
  
  for(int i = 0; i < 20; i ++){
    char rand = random(65, 100);
    Wire.write(rand); 
  }
   
  Wire.endTransmission();    // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble

Source Link
Hoytman
  • 747
  • 5
  • 13
  • 27

How does the Arduino send more than 6 bytes via I2C

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger strings. This code works without error:

Wire.beginTransmission(4); // transmit to device #4

for(int i = 0; i < 20; i ++){ char rand = random(65, 100); Wire.write(rand); }

Wire.endTransmission(); // stop transmitting

How is this possible? It seams that 32 characters can be sent without trouble