Hello guys!
Probably a dumb question but I'm not secure how to handle this situation:
I have a sketch where my Arduino due is receiving MIDI messages, doing some stuff and sending UDP messages accordingly the MIDI message received.
This must be done "as soon as possible" because I want to have this with less delay possible.
This is all working fine but now I would like to add a web server for remote configuration of the arduino. Which for me looks pretty "heavy" to handle.
I want to have it a secondary thing, don't care if the webserver is slow or laggy, messages must come out first.
This should be done easily if I had interrupts on received MIDI message and handle them in the interrupt before going back to the main loop but, unfortunately, the USB MIDI library needs to call USBMIDI.Read() for getting MIDI Messages.
I was thinking how I can handle this priorities thing as best for performance. Now I'm thinking to use a timer interrupt running really fast calling the read function and handling the webserver settings in the main loop.
Do you have any better Idea for that?
Is Arduino capable to handle different interrupt priorities?
Hope you guys have some time for me
Thanks!
Lorenz