I'm trying to use the Wire library to do I2C between two Arduino boards and I'm a little confused about the functions. In the master, I can do a requestFrom(slaveAddr, numBytes), but on the slave the onRequest() callback handler doesn't take any parameters so are you just suppose to guess how many bytes the master requested?
And on the flip side, I the master does a beginTransmission-writes-endTransmisson pattern and the onReceive() callback handler does have a numBytes parameter which every example I have found seems to completely ignore, choosing to just read until available() returns false.
What am I missing here? Is this really as crazy as it seems or is there a method to the madness?