Re: Best (simplest) way to share data between processes

Liste des GroupesRevenir à cl python 
Sujet : Re: Best (simplest) way to share data between processes
De : cl (at) *nospam* isbd.net (Chris Green)
Groupes : comp.lang.python
Date : 08. Jul 2024, 14:52:59
Autres entêtes
Message-ID : <b24tlk-pqr1.ln1@q957.zbmc.eu>
References : 1 2
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-36-generic (x86_64))
Piergiorgio Sartor <piergiorgio.sartor.this.should.not.be.used@nexgo.removethis.de> wrote:
On 06/07/2024 09.28, Chris Green wrote:
I 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.
 
Yes, but it's conceptually (and programming wise) much simpler to have
separate scripts.  Some of them are simple 'on demand' scripts that I
run from the command line when I want to know something.  Others are
scripts that drive displays on control panels.

--
Chris Green
·

Date Sujet#  Auteur
6 Jul 24 * Best (simplest) way to share data between processes13Chris Green
6 Jul 24 +- Re: Best (simplest) way to share data between processes1Stefan Ram
6 Jul 24 +* Re: Best (simplest) way to share data between processes2Piergiorgio Sartor
8 Jul 24 i`- Re: Best (simplest) way to share data between processes1Chris Green
7 Jul 24 +* Re: Best (simplest) way to share data (Posting On Python-List Prohibited)5Lawrence D'Oliveiro
8 Jul 24 i`* Re: Best (simplest) way to share data (Posting On Python-List Prohibited)4Chris Green
8 Jul 24 i +* Re: Best (simplest) way to share data2Stefan Ram
9 Jul 24 i i`- Re: Best (simplest) way to share data1Chris Green
9 Jul 24 i `- Re: Best (simplest) way to share data (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
8 Jul 24 +- Re: Best (simplest) way to share data between processes1Barry
8 Jul 24 +- Re: Best (simplest) way to share data between processes1MRAB
8 Jul 24 +- Re: Best (simplest) way to share data between processes1Barry Scott
7 Jul 24 `- Re: Best (simplest) way to share data between processes1Left Right

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal