If it helps, yes, otherwise just ignore me.Hi Gavin, was this meant for me?
I only spotted this post yesterday.
You are using time.sleep in Python?
100% cpu usage?
I don't like loops in Python, bad experience years ago.
If I need to use Python I make sure it exits and call it via shell script etc
I run free when testing Python code to make sure there are no memory leaks.
It has been years since I used Python for GPIO stuff, tend to use Joan's pigpio daemon.
Most of my stuff tend to run 24/7 so it needs to work well.
Stuff that is just UI on/off then Python is okish.
I have toggled GPIO pins from one program to signal another app in another language.
Not as silly as writing a 0 or 1 to file on the uSD