I can't test the example given as it returns an error "unable to open serial port".
The following is the code:
Code: Select all
Dim b As String
If Open Com ("com1:9600,n,8,1,cs,rs,ds,bin" For Binary As #1) <> 0 Then
Print "unable to open serial port"
End
End If
Print "Sending command: AT"
Print #1, "AT" + Chr(13, 10);
Sleep 500,1
Print "Response:"
While( LOC(1) > 0 )
b = Input(LOC(1), 1)
Print b;
Wend
Close #1
Code: Select all
dim as string s = "hello help" + chr(13) + "hell" + chr(13) + "test"
dim as string buffer
open "mooose.txt" for output as #1
put #1,,s
print loc(1)
While( LOC(1) > 0 )
buffer = Input(LOC(1), 1)
Print buffer;
Wend
close #1
sleep