Soil conductivity raw values

Hi,
I’m pretty new to the Parrot Flower Power Sensor and tried out the node-flower-power test.
I read a little bit through the index.js file and found a TODO comment in the function:
FlowerPower.prototype.convertSoilElectricalConductivityData = function(data) { var rawValue = data.readUInt16LE(0) * 1.0; // TODO: convert raw (0 - 1771) to 0 to 10 (mS/cm) var soilElectricalConductivity = rawValue; return soilElectricalConductivity;};

As I understand this, the lib just returns the raw value but doesn’t convert it to mS/cm

Is this correct?

hi @iceman

Obviously, no conversion is returned. We can see 0 <= rawValue <= 1771 and must be convert to 0 <= soilElectricalConductivity <= 10

With this informations we can deduct:
soilElectricalConductivity = (1771 / 10) * rawValue

But I don’t know if it’s really the good value expected…

Bruno

following linear equation seems to fit better :
soilElectricalConductivity = (10 / 1771) * rawValue

But I doubt the conversion is linear!