I’m trying to create a none blocking RTTTL music player. Just to test it out I created a musicPlayer class and called a method via a software timer with no delay. This does work, however all software timers are executed on the same thread so this blocks my display update timer
Is there a way to access another thread? So I’d have the following threads active:
Failing that I was thinking of implementing the tone() and delay() functions using standard PWM and software timers, so this wouldn’t impact the other software timers thread.
Has anyone got any better ideas?
BTW, how come I can only declare an SWtimer at the top level of the file and not from within a function? I’m trying to spawn SWtimers at run-time rather than just use a predefined one.