Scenario: I'm updating my Boot Alarm and part of this process is turning the alarm into a song. Before, the alarm would do quick repeating cycles and it would check to see if it was disarmed after each cycle. However, with a song, the cycle becomes much, much longer. An interrupt is generated and the status is changed but I would like to break out of the song as soon as the disarm signal is sent, not after the entire song is done and it checks the status again.
Question: Is there a way to break out of the while loop as soon as the signal is sent? Currently, I just have for() loops placed throughout the song so that it only continues for a couple of seconds after disarming. It seems... inelegant - to use the words of someone else in these forums recently.
Thanks!
- Josh
Question: Is there a way to break out of the while loop as soon as the signal is sent? Currently, I just have for() loops placed throughout the song so that it only continues for a couple of seconds after disarming. It seems... inelegant - to use the words of someone else in these forums recently.
Thanks!
- Josh