I checked out if I have a real connection with GTKTerm, and that does print out the data that I am expecting. Since this is running on the new Debian Stretch version of Linux, I am now wondering if something got changed, and freeBasic input# command is not responding correctly?
Thanks
Code: Select all
'
' December 15, 2017
'
Dim As String Key,buffer
'Open Com "/dev/ttyUSB0:115200,n,8,1,cs0,ds0,cd0,rs" As #1
Open Com "/dev/ttyUSB0:115200,n,8,1" As #1
'main serial send/receive routine
Do
Key = Inkey$
If Key = Chr$(27) Then 'Esc key
Exit Do 'End the program
End If
'Check for input
While Loc(1) > 0
buffer = Input$(Loc(1),#1) 'Grab a char
Print buffer 'Print the char
Wend
Sleep 1,0
Loop
'close the port(s)
Close
End