// Agrinovo EC-110 conductivity and salinity probe // Prints conductivity, temperature, TDS and salinity every 5 seconds. // // Sensor cable // Red supply +, 12-24 V DC // Black supply ground, joined to the board's ground // Yellow RS485 A // Green RS485 B // // The board talks to the sensor through an RS485 transceiver (MAX485 or // similar). AgrinovoDefaultPort.h lists the serial pins used on each board. // // https://agrinovo.io/products/sensors/aqua/ec/ec-110-probe/ #include #include const int DE_PIN = 4; // transceiver DE and RE, tied together AgrinovoBus bus(AGRINOVO_PORT, DE_PIN); AgrinovoEC110 probe(bus); // Modbus address 1 void setup() { Serial.begin(115200); agrinovoPortBegin(9600); bus.begin(); } void loop() { if (probe.read()) { Serial.print("Conductivity: "); Serial.print(probe.conductivity(), 0); Serial.println(" µS/cm"); Serial.print("Temperature: "); Serial.print(probe.temperature(), 1); Serial.println(" °C"); Serial.print("TDS: "); Serial.print(probe.tds(), 0); Serial.println(" ppm"); Serial.print("Salinity: "); Serial.print(probe.salinity(), 1); Serial.println(" ppt"); } else { Serial.println(probe.errorText()); } delay(5000); }