It's an old post, but I hope someone could help me anyway. I'm trying to do aquarium controller, which should measure pH as well. I'm interfacing Arduino via LCD and buttons. I would like to have temperature compensated pH measurements, but also it would be nice to have calibration via LCD. My question is where did these "magic numbers" (in the quote) come from?
sensorValue = 7.0 - (2.5 - analogRead(sensorPinPH) / 204.8 ) / (0.257179 + 0.000941468 * sensors.getTempCByIndex(0));
What is the meaning of 0.257179 or 0.000941468?
The equation is linear, but which numbers are supposed to stay the same and which should be changed when doing calibration?