Is there any way to manage buttons input as event ?
I currently handle this in an infinite loop in my program, but if you don't push the button at the good time, (when reading buttons status), then your input is not considered.
One idea would be to use pygame event manager to handle this, but I don't know if it's possible to map GPIO input to pygame events ?
Or should I have a separate thread for reading GPIO continuously ? That would be bad for processor usage on my poor zero 1 :(
Any help will be appreciated !
Is there any way to manage buttons input as event ?
I currently handle this in an infinite loop in my program, but if you don't push the button at the good time, (when reading buttons status), then your input is not considered.
One idea would be to use pygame event manager to handle this, but I don't know if it's possible to map GPIO input to pygame events ?
Or should I have a separate thread for reading GPIO continuously ? That would be bad for processor usage on my poor zero 1 :(
Any help will be appreciated !