ufire-ec-device

justind000/ufire-ec/ufire-ec-device

Measure EC, TDS, and temperature with the uFire EC device.
ufire-ec-device
@/ufire-ec-device
Measure EC, TDS, and temperature with the uFire EC device.
STARTpulse
ufire-ec-device
EC
TEMP
TDS
START
TDSnumber
Total dissolved solids (500)
TEMPnumber
Temperature in C
ECnumber
Electrical Conductivity in mS
To use the node in your project you should have the justind000/ufire-ec library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD require "https://github.com/u-fire/Isolated_EC"

{{#global}}
#include <uFire_EC.h>
{{/global}}

struct State {
};

//using Type = uFire_EC*;

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    if (!isInputDirty<input_START>(ctx))
        return;

    uFire_EC EC;
    float temp = EC.measureTemp();
    emitValue<output_EC>(ctx, EC.measureEC(temp));
    emitValue<output_TEMP>(ctx, temp);
    emitValue<output_TDS>(ctx, EC.PPM_500);

}