There’s no problem in running multiple processes on the
What I wanted to say is that
GrovePi's firmware wasn’t built on the idea of providing multiple “streams” of data for different processes at the same time.
Even though it works, we haven’t tested it much so we may not know all of its “hiccups” when multiple processes try to access its resources.
That’s why we don’t recommend using it this way.
Now, regarding your issue, I still think there’s an issue with the firmware otherwise, the values wouldn’t have got “shared” between the sensors.
I think there’s a timing issue somewhere, so adding delays between readings could make it work.
I’m going to have a talk with the guy that wrote this firmware and get a resolution on this matter.
Until then, I suggest you keep everything within one process and add delays between any readings.
This should solve your problem.
If you still want
parallelization, then you can have a
multi-threaded process. But I’d be more careful as you’ll need to use
locks for prioritizing the access to
GrovePi. The use of
locks will help you add delays between readings.
multi-threaded alternative is inherently more complex than the use of one
I hope we get this issue solved one way or another.