This is interesting.  A current project is converting the software for a Wemos 
Microcontroller in Arduino format (C++?) to micropython for a Raspberry Pi PICO 
W.  The Wemos program has a Loop that periodically reads a button pressed 
state. I haven't dug into it for awhile so I am trying to refresh my memory on 
it.

Peter

On 01/05/2026 14:10, Terry Coles wrote:
Polling is often not the ideal way to do it.  There are better ways,
like event_detected().  But don't switch to those without getting the
current method working; that would just be adding another layer of murk
to obscure.  Fully understand the current behaviour first.
https://sourceforge.net/p/raspberry-gpio-python/wiki/Inputs
As you say, I'll try to work out what is going on in the code before I do anything more exotic.
--
 Next meeting: Online, Jitsi, Tuesday, 2026-05-05 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
 New thread, don't hijack:  mailto:[email protected]

Reply via email to