06-09-2015 03:29 PM
Hello everyone,
I am trying to get a soil moisture sensor working on labview.
It has an analog output between 0 and 4,2 v . however in the Ardunion IDE i can get values from 0 too 900 in the serial monitor.
How can i see the same values on labview ? any ideas ?
06-09-2015 04:02 PM
Wild guess - the Arduino is reporting the integer counts that the A/D is providing.
If it's a 10-bit range (1024 counts), then 4.2 / 5 * 1024 = 860 - that's about your 900 count.
Simply multiply the counts by 5 / 1024 to get Volts, or multiply Volts * 1024 / 5 to get counts.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-09-2015 04:58 PM
Why would you even want to??? 900 is just an arbitrary number like 4.2. Just set up an indicator of your choice and scale it so it displays from 0% (dry) to 100% (soaked) and you're done. I would use the meter indicator and make the color bar go from red to blue (or brown to green if it's for a plant).
06-09-2015 05:10 PM
Thanks 😄