I think I know the answer to this, but I thought I would pose it anyways in case you programming gurus have any ideas.
I have a program that is reading temperature sensor data and logging it to a spreadsheet. I got this working.
Now I'm trying to add some functionality where a command is sent over serial and read by the Arduino to go do something.(Change position of a servo motor). I got this working. haha
But what I would like to happen is that if the Arduino gets a command over serial, stop what its doing... change the servo position... then continue on with the program where it left off.
The reason is I am recording 120 temp readings over a 5 minute period which is one time through my main loop. I don't want to have to wait 5 minutes for the program to get to the point where it reads the serial command. I want it to execute the serial command as soon as it receives it.
My gut feeling is this is not possible. The only thing I was thinking was putting "check for serial command"s at various places in my code so it checks every few seconds instead of every 5 minutes.
Any guidance would be appreciated.