I was wondering if it was possible to read a full range pH scale using the BNC sensor shield by practical maker. Arduino Shield List: Practical Maker BNC Sensor Shield
The current code reads from 7-14 or from 0-7. I was wondering if I could get the shield to read from 0-14 all in one. I tried using an if statement but no avail.
int ph_pin = 5;
#define ARDUINO_VOLTAGE 5.0
// PH_GAIN == (4000mv / (59.2 * 7)) → 4000mv is max output and 59.2 * 7 is the maximum range (in millivolts) for the ph probe.
#define PH_GAIN 9.6525
reading = 0;
for(i = 0; i < 50; i++)
reading += analogRead(ph_pin);
reading /= i;
millivolts = reading * ARDUINO_VOLTAGE / 1.024;
ph_value = ((millivolts / PH_GAIN) / 59.2) + 7; //
Serial.println(ph_value, 2); // 2 decimals