Skip to content

PushButtons in player-sdfat-i2s #1060

Answered by pschatzmann
carlesfg asked this question in Q&A
Discussion options

You must be logged in to vote

I would not introduce separate variables for state management but query or let the player handle it automatically: e.g. after calling stop(), you can still call copy: it's just not doing anything...

Whenever you poll pins in a loop and want to act on it you should debounce the result, otherwise you risk that the action is executed multiple times.

You could use the AudioActions class that I have added for handling the AudioKit buttons, but it is working with any pin as well.

Here is an example how to use it...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@carlesfg
Comment options

Answer selected by pschatzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants