Skip to content

Manage buttons input as event ? #5

@Sebwap

Description

@Sebwap

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 !

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions