-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interrupts Examples | Sleep Wakeups (Esp32-c3) #2080
Comments
I have right know the same problem to implement a button to recognize short and long press. I find it ugly needing 3 tasks per button to be able to evaluate a button press |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HI! I am new to the rust embedded world, or general rust I would say so I am looking for some guidance from more experienced folks out there! :D Sadly I can not find any examples nor issues for my problem and all the examples either don't work or are outdated as it seems.
I have an Esp32-c3 devboard which supports most of the embassy functionalities as I found out via #745 .
Furthermore I had a look at the embassy examples from their repo here .
My Task: I have a button and a led connected to the chip. I want that the led is blinking when I either press the button OR a timer runs for 10 seconds. IF either the button is pressed or the timer ends I want the timer to restart from the beginning. I want the chip as power efficient as possible so I thought I use some interrupts.
I managed to get it working in standard esp-hal which looks like this:
ESP HAL VERSION
Now I wanted to achieve the same in embassy which ended up in something like this.
Embassy Version
Even I can tell their are mayor problems with this code.
Any help would be really greatly appreciated.
I have attached all of the files to hopefully recreate my issue.
embassy_button_blinks.zip
button-blinks-task.zip
The text was updated successfully, but these errors were encountered: