EEPROM_write(SlopeValueAddress, slopeValue);
}
if(EEPROM.read(InterceptValueAddress)==0xFF && EEPROM.read(Int
erceptValueAddress+1)==0xFF && EEPROM.read(InterceptValueAddress+2
)==0xFF && EEPROM.read(InterceptValueAddress+3)==0xFF)
{
interceptValue = 0; // If the EEPROM is new, the recommenda
tory intercept is 0.
EEPROM_write(InterceptValueAddress, interceptValue);
}
}
Method2.HardwareCalibrationthroughpotentiometer
If you've taken the Method 1. Software Calibration, you can
ignore this part.
1. Connect according to the graphic, that is, the pH electrode is
connected to the BNC connector on the pH meter board, and
then use the connection lines, the pH meter board is connected
to the analog port 0 of the Arduino controller. When the Arduino
controller gets power, you will see the blue LED on board is on.
2. Upload the sample code to the Arduino controller.
3. Put the pH electrode into the standard solution whose pH value
is 7.00, or directly short circuit the input of the BNC connector.
Open the serial monitor of the Arduino IDE, you can see the pH
value printed to it, and the error does not exceed 0.3. Record
the pH value printed, then compared with 7.00, and the
difference should be changed into the "Offset" in the sample
code. For example, the pH value printed is 6.88, so the
difference is 0.12. You should change the # define Offset 0.00
into # define Offset 0.12 in the sample code.
4. Fine adjustment
For Acid solution: Put the pH electrode into the pH standard
solution whose value is 4.00. Then wait about a minute, adjust
the Gain Potential device, let the value stabilise at around 4.00.
At this time, the acidic calibration has been completed and you
can measure the pH value of an acidic solution.
For Alkaline solution: According to the linear characteristics
of pH electrode itself, after the above calibration, you can