loops - Vb.Net Wait for Async Response -


i working on windows form application controls number of stepper motors in turn drive camera. stepper motors controlled through arduino acting serial port.

in app, arduino receives absolute position commands (e.g. x;23,y;90,z;120) , moves various motors respective commands, whilst motors moving arduino outputs current position, @ end have output x;ok,y;ok,z;ok response.

as motor positions received arduino, these updated within application on status view, within code need loop below (pseudocode);

for = lowerlimit upperlimit step intervalstep      com1.writeline("x;" & x ",y;" & y & ",z;" & i)      'wait ok response serial port      'capture image next 

how go pausing loop (thread) until receive ok response serial port?

many thanks!


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -