I am using Arduino controller with MATLAB to build a system that reads in sensor data, which triggers a live feed camera to capture an image for real time image processing. Based on these results further processing is done "after some required delay" through controller. Now the problem I am facing is I cannot read sensor data until the last step of previous stage is completed. I want to be able to read sensor data continuosly and process images even while the last processing stage based on previous image is still executing (because of the delay provided). Thank you for any advice/help. Sorry if my english is bad I hope I'm clear.
Where does the Arduino come into this?
a1604:
Sorry if my english is bad I hope I'm clear.
Your English is fine but it sounds like a complicated system and it is unclear exactly how you intend it to work.
I assume you're asking about the Arduino part of your solution. Can you describe what the Arduino does currently (in terms of the sequence of inputs it receives and actions it takes) and then describe what you want it to do in the same terms?
I want to be able to read sensor data continuosly and process images even while the last processing stage based on previous image is still executing
To me that sounds like a LabView problem.
I know it's software problem but I was thinking if there's a way to store the commands given to arduino and execute them at the desired timing later while simultaneously I can read sensor input and start further processing.
I am using Arduino Uno.
a way to store the commands given to arduino and execute them at the desired timing later while simultaneously I can read sensor input and start further processing.
You could use multiple Arduinos.
You could learn how to do proper programming to avoid blocking.
You could investigate RTOS for Arduino.
Ray
a1604:
...if there's a way to store the commands given to arduino and execute them at the desired timing later while simultaneously I can read sensor input and start further processing.
http://www.u-needa-state-machine.com
OK so there's no .com but that's what you need. It's a kind of multitasking.
a1604:
I know it's software problem but I was thinking if there's a way to store the commands given to arduino and execute them at the desired timing later while simultaneously I can read sensor input and start further processing.
I am using Arduino Uno.
Yes as the arduino communicates through serial it can send data at any time and that data will sit in the buffer until LabView reads it.
To me that sounds like a LabView problem.
I think your mean MATLAB Mike.
raschemmel:
To me that sounds like a LabView problem.
I think your mean MATLAB Mike.
Yes, but the two are so similar in the way they communicate.