Interrupt via mobile app

Hi,
For a project, I am making an autonomous robot that can move around a room on its own without intervention and therefore carrying out a fairly long program, but I would like to be able to switch it to manual controls so that it can be directed by a person using a mobile application. For this I want to ensure that when we press a button on a mobile application the arduino program stops to change a value and switch the robot to manual as would the interrupt function but by receiving the command not from a pin of the card but an external application such as arduino iot remote or mit app inventory. Not finding a solution for this I was wondering if anyone knows how I can go about it or if it's even possible.
Thank you for your help, if you take the time to look.

Hi @math3000 ,

Welcome to the forum..

Really shouldn't need an interrupt for this..
Just make sure you loop is quick..
Don't use delay function or long while/for loops..
Quite allot can be achieve..

Can't get it going, upload some code using that little code button..
Hard to truly comment without it..

good luck.. ~q

Interrupt is the magic help for learning people but it seldomly works.
An interrupt can set a stop flag that is checked during the loop executon.
There's no magic jump to be done.

The thing is that the program itself executes quickly but it is the movements of the robot which take time. For example if the robot has to advance 8 meters then the program will have to wait until the robot has finished moving which can take time. I know it's not really the best but I'm a beginner and this robot is a school project so I did what I could to make it work. So the loop can take several minutes to complete, which is why the idea of ​​using an interrupt was my main idea.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.