I have an Arduino with a Stepper Motor that I'm controlling via SerialPort. I'd like to catch the 'Done Moving X' sent via the Arduino however sometimes it catches and some times it doesn't. Any feedback would be appreciated.
Here is my code
If InStr(Me.LookAhead(Encodings.ASCII), Chr(13) + Chr(10)) > 0 Then streamIn = Me.ReadAll(Encodings.ASCII) if streamIn.IndexOf("Done Moving X")>0 then msgbox("Huray") end OutputArea.Text = OutputArea.Text + streamIn End If