After looking at some other code this is what i did and it works, now for the next one sending data from the VB application
Code:
' ************************************************************
' * receive data from the USB bus *
' ************************************************************
DoUSBIn:
USBBufferCount = USBBufferSizeRX ' RX buffer size
USBService ' keep connection alive
USBIn 1, USBBufferRX, USBBufferCount, Timeout ' read data, if available
Timeout: '
return
' ************************************************************
' * wait for USB interface to attach *
' ************************************************************
DoUSBOut:
WaitPC:
USBBufferCount = USBBufferSizeTX ' TX buffer size
USBService ' keep connection alive
USBOut 1, USBBufferTX, USBBufferCount, Waitpc ' if bus available, transmit data
return
Bookmarks