04-03-2025, 10:14 PM
You could try:
https://qb64phoenix.com/qb64wiki/index.php/OPEN_COM
although I don't think you can get any USB device opened..
This code accesses COM1: then input/output functions are available.
https://qb64phoenix.com/qb64wiki/index.php/OPEN_COM
although I don't think you can get any USB device opened..
This code accesses COM1: then input/output functions are available.
Code: (Select All)
On Error GoTo Handler
FF = FreeFile
comPort$ = "COM1:" 'try a COM port number that does not exist
Const comMode$ = "9600,N,8,1,CS0,DS0" 'Use 0 to avoid timeouts
Open comPort$ + comMode$ For Random As FF
If errnum = 0 Then Print "COM exists!"
K$ = Input$(1)
End
Handler:
errnum = Err
Print "Error:"; errnum
Resume Next
