You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have 3 TDS sensors and have the following code, wondering how I enter calibration function for the other 2 sensors
float temperature = 25;
float tdsValue_SUP = 0;
float tdsValue_PREDI = 0;
float tdsValue_OUT = 0;
float kValue_SUP = 0;
float kValue_PREDI = 0;
float kValue_OUT = 0;
GravityTDS gravityTds_SUP;
GravityTDS gravitytds_PREDI;
GravityTDS gravityTds_OUT;
gravityTds_SUP.setPin(TDS_SUP_Pin);
gravityTds_SUP.setAref(5.0); //reference voltage on ADC, default 5.0V on Arduino UNO
gravityTds_SUP.setAdcRange(1024); //1024 for 10bit ADC;4096 for 12bit ADC
gravityTds_SUP.setKvalueAddress(4); //set the EEPROM address to store the k value,default address:0x08
gravityTds_SUP.begin(); //initialization
gravitytds_PREDI.setPin(tds_PREDI_Pin);
gravitytds_PREDI.setAref(5.0); //reference voltage on ADC, default 5.0V on Arduino UNO
gravitytds_PREDI.setAdcRange(1024); //1024 for 10bit ADC;4096 for 12bit ADC
gravitytds_PREDI.setKvalueAddress(8); //set the EEPROM address to store the k value,default address:0x08
gravitytds_PREDI.begin(); //initialization
gravityTds_OUT.setPin(TDS_OUT_Pin);
gravityTds_OUT.setAref(5.0); //reference voltage on ADC, default 5.0V on Arduino UNO
gravityTds_OUT.setAdcRange(1024); //1024 for 10bit ADC;4096 for 12bit ADC
gravityTds_OUT.setKvalueAddress(12); //set the EEPROM address to store the k value,default address:0x08
gravityTds_OUT.begin(); //initialization
gravityTds_SUP.setTemperature(temperature); // set the temperature and execute temperature compensation
gravityTds_SUP.getKvalue();
gravityTds_SUP.update(); //sample and calculate
tdsValue_SUP = gravityTds_SUP.getTdsValue(); // then get the value
//Calculate TDS from Output of Membrane
gravitytds_PREDI.setTemperature(temperature); // set the temperature and execute temperature compensation
gravitytds_PREDI.getKvalue();
gravitytds_PREDI.update(); //sample and calculate
tdsValue_PREDI = gravitytds_PREDI.getTdsValue(); // then get the value
//Calculate TDS from Output
gravityTds_OUT.setTemperature(temperature); // set the temperature and execute temperature compensation
gravityTds_OUT.getKvalue();
gravityTds_OUT.update(); //sample and calculate
tdsValue_OUT = gravityTds_OUT.getTdsValue(); // then get the value
If I use ENTER > CAL:
It updates only the GravityTDS gravityTds_SUP
The text was updated successfully, but these errors were encountered:
Hi, I have 3 TDS sensors and have the following code, wondering how I enter calibration function for the other 2 sensors
If I use ENTER > CAL:
It updates only the GravityTDS gravityTds_SUP
The text was updated successfully, but these errors were encountered: