Particle Argon Interrupt Priority

I have two Argons on a mesh network that need to communicate with one another. The “Master” Argon will publish a command on the mesh to tell the “Slave” Argon to drive some motors. The Slave is set up to execute the Master’s request in a Subscription handler. The Master is a bit of a micro-manager so when the Slave is executing, the Master will need to interrupt again and give the Slave new instructions.

So a few questions:
What’s the priority of mesh.subscribe?
Is there a higher priority interrupt that can be set to interrupt a subscription handler?
Once interrupted, is there a way to exit the subscription handler?

Welcome. You will probably need to post some code or more information about timing - this is a very broad requirement ?

A subscription handle should be treated like an interrupt, and shouldn’t execute anything.

Use it to set a flag and exit asap, then check The flag in the loop and act accordingly. You can then use a different handler to un-set that flag, or have it do something else (like a state machine).

1 Like