this problem is solved btw
Please, post the screenshot of the Serial Monitor of Master that is showing the values received from Slave.
1. The Master has requested for 32-byte data from Slave by issuing this command:
2. You have queued the following data bytes into the I2C Buffer of Slave for onward transfer to Master.
Wire.print("pH value:"); //9 bytes (ASCII codes)
Wire.print(pH_Value); //3/4 bytes (ASCII coded) range:00.00 - 14.00
Wire.print("ORP value: "); //10 bytes
Wire.print(ORP_Value); //6 bytes? xxx.xx
Wire.println(" mV-- "); //7 bytes
3. You have queued 36 bytes data (Step-2); but, the Master is reading only 32 bytes in Step-1. Why is this mismatch? Try with this command at the Master side:
4. As you are not sure about the number of digits present in the float type variables pH_Value and ORP_Value, it is safe to send the binary32 formatted (4-byte) values for these variables instead of ASCII coded values. The procedures are:
mypH.pH_Value = pH_value;
myORP.ORP_Value = ORP_value;
Wire.print("pH value:"); //9 bytes
Wire.write(mypH.pH, sizeof(myPh.pH)); //4 bytes
Wire.print("ORP value:"); //10 bytes
Wire.write(myOPR.ORP, sizeof(myORP.ORP)); //4 bytes
Wire.println("mV--"); //4 bytes
At the Master side, let us execute the following code:
And also, use the union at the Master side to reconstruct the float values for the variables pH_Value and ORP_Value.