// Agrinovo F-100 fluoride probe // Prints fluoride, electrode signal and temperature every 5 seconds. // // Sensor cable // Red supply +, 12-24 V DC // Black supply ground, joined to the board's ground // Yellow RS485 A // White 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/ion-selective/f-100-probe/ #include #include const int DE_PIN = 4; // transceiver DE and RE, tied together AgrinovoBus bus(AGRINOVO_PORT, DE_PIN); AgrinovoF100 probe(bus); // Modbus address 1 void setup() { Serial.begin(115200); agrinovoPortBegin(9600); bus.begin(); } void loop() { if (probe.read()) { Serial.print("Fluoride: "); Serial.print(probe.fluoride(), 2); Serial.println(" mg/L"); Serial.print("Electrode signal: "); Serial.print(probe.electrodeSignal(), 1); Serial.println(" mV"); Serial.print("Temperature: "); Serial.print(probe.temperature(), 1); Serial.println(" °C"); } else { Serial.println(probe.errorText()); } delay(5000); }