// Agrinovo ORP-100 ORP probe // Prints ORP 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/orp/orp-100-probe/ #include #include const int DE_PIN = 4; // transceiver DE and RE, tied together AgrinovoBus bus(AGRINOVO_PORT, DE_PIN); AgrinovoORP100 probe(bus); // Modbus address 1 void setup() { Serial.begin(115200); agrinovoPortBegin(9600); bus.begin(); } void loop() { if (probe.read()) { Serial.print("ORP: "); Serial.print(probe.orp(), 0); Serial.println(" mV"); } else { Serial.println(probe.errorText()); } delay(5000); }