Wire.available() returns different values depending on the platform.
in master_receiver on the PC (with slave_sender running on the Mac)
while(wCount = Wire.available()) // slave may send less than requested
Serial.print(wCount,DEC); // always returns a value of 1
in slave_receiver on the Mac (with master_sender running on the PC)
while(wCount = Wire.available()) // slave may send less than requested
Serial.print(wCount,DEC); // always returns the number of bytes remaining in the message
Could someone verify this and then report it as a bug?
in slave_receiver on the PC (with master_sender running on the Mac)
while(wCount = Wire.available()) // slave may send less than requested
Serial.print(wCount,DEC); // always returns the number of bytes remaining in the message
in master_reader on the Mac(with slave_sender running on the PC)
while(wCount = Wire.available()) // slave may send less than requested
Serial.print(wCount,DEC); // returns the number of bytes remaining in the message
So I tested the failed example again and got this ...
in master_receiver on the PC (with slave_sender running on the Mac)
while(wCount = Wire.available()) // slave may send less than requested
Serial.print(wCount,DEC); // returns the number of bytes remaining in the message
I apparently made a mistake. It is working now. I may have mis-spelled a variable name.
Thanks for checking this.