Dear developer and friends in this wonderful forum
Thanks a lot for great efforts helping us with XOD nodes special thanks to wayland
As i mention in my previous post we are developing fast prototype of (Open Source EMERGENCY Ventilator) based on XOD IDE
Now we having hard times trying to build nod for the i2c flow sensor (SFM3300)
Here is some information and library
Sorry it’s taken me a while to reply. The Arduino library I’ve wrapped doesn’t have methods for reading temperature or performing a soft reset. I’ll see if I can add these over the weekend. If I remember correctly, the device outputs its own temperature, which is not necessarily the same as the temperature of the gas flowing through it.
I’ve just published an updated library (version 0.0.3) that may be able to perform soft reset and temperature measurements. As before, the only testing I’ve been able to do is check that the example patches compile.
If you want to see the details, take a look at this file:
You will see that the offset and scale factor are read from the device using the methods requestOffset and requestScaleFactor respectively. The method readFlow calculates flow rate in slm using the formula you posted. I’ve created a new node request-offset-scale-factor which will report the offset and scale factor. If you want to check these values, run example-read-offset-scale in the debugger.
I noticed a warning in the compiler output related to one of the methods in the underlying Arduino library. I don’t know if this was a critical problem, but I’ve forked the Arduino library and fixed the problem (https://github.com/WaylandM/MTW-SFM3X00).
You’ll need to upgrade to the latest version of the XOD IDE (0.35.1). I’ve used the new C++ syntax for clarity and brevity, but this is only supported in version 0.35.0 onwards. I’ve checked that the code will compile for the Due, but I don’t have a Due for testing.
For future reference, to see the full compiler output you have to scroll up (as mentioned by @gweimer). The screenshot you posted shows us only the last part of the compiler output telling us there was an error. The specific problem would have been highlighted earlier in the compiler output.
i m still not familiar with if conditions and other basic code parameters
any guide material or suggestion to read or study will be appreciated
also i found library for pid controller i need to use it to control motor over pwm