Liste des Groupes | Revenir à cl python |
On 06/07/2024 09.28, Chris Green wrote:Yes, but it's conceptually (and programming wise) much simpler to haveI have a Raspberry Pi in my boat that uses I2C to read a number of
voltages and currents (using ADS1115 A2D) so I can monitor the battery
condition etc.
At present various different scripts (i.e. processes) just read the
values using the I2C bus whenever they need to but I'm pretty sure
this (quite rarely) results in false readings because two processes
try to read at the same time.
Thus I'm looking for ways to prevent simultaneous access.
Why using "different scripts"?
Is it there any particular reason?
Maybe it would be better, if possible, to have
a single script, which, sequentially, reads
whatever needs to be read (or written).
In a loop.
This is even simpler than using a file.
Les messages affichés proviennent d'usenet.