// Agrinovo DO-110 dissolved oxygen probe // Prints dissolved oxygen and temperature every 5 seconds. // // Sensor cable // Red supply +, 12-24 V DC // Black supply ground, joined to the board's ground // Yellow or white 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/do/do-110-titanium-probe/ #include #include const int DE_PIN = 4; // transceiver DE and RE, tied together AgrinovoBus bus(AGRINOVO_PORT, DE_PIN); AgrinovoDO110 probe(bus); // Modbus address 1 void setup() { Serial.begin(115200); agrinovoPortBegin(9600); bus.begin(); } void loop() { if (probe.read()) { Serial.print("Dissolved oxygen: "); Serial.print(probe.dissolvedOxygen(), 2); Serial.println(" mg/L"); Serial.print("Temperature: "); Serial.print(probe.temperature(), 2); Serial.println(" °C"); } else { Serial.println(probe.errorText()); } delay(5000); }