if use looping, how to interrupt out to next mode?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-04-03 2:02 AM
Three mode:
Mode 0: Off
Mode 1: 80% loading (PWM)
Mode 2: 50% loading (PWM)
Frequency: 10KHz
Cycling mode (push button):
Mode 0 -> Mode 1 -> Mode 2 -> Mode 0 -> …. -> ….
When push the button, it will change the next mode immediately.
If I use the delay loop in each mode, it cannot jump to next mode immediately.
How can I do?
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-04-03 2:08 AM
Decimate the delay and check the button more frequently, and exit the delay promptly when needed.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
