Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tank Level control & Drain valve closure
#13
Hmm..

I ran the code for about a half hour and didn't see any great variation in output. Raspbian is not a real-time operating system. It switches between tasks in the background and this may cause occasional problems with timing. I am running the lite version which has fewer background processes than the full version.

I added a check in the code that will skip any reading that is much different from the previous one. This should provide a more consistent output than averaging multiple readings if there is an outlier.

You can find the updated code on GitHub at:
https://gist.github.com/Dan-in-CA/681a1a...48662492c6

Dan
Reply


Messages In This Thread
RE: Tank Level control & Drain valve closure - by dan - 2018 Dec 11, 05:43 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)