W wroyw Member Licensed User Mar 10, 2017 #1 I have another question regarding USBserial : B4X: If usb.Open( 9600,1) = usb.USB_DEVICE Then AStream.Initialize(usb.GetInputStream,usb.GetOutputStream,"") AStream.Write(Array As Byte (0x0f)) after that I can see in the debug watch window the entry "Astream / ain / buffer / 0..99" my received bytes. How can I use this Bytes in my program ? (without events) and how can I get the count from the received bytes ? (without a event)
I have another question regarding USBserial : B4X: If usb.Open( 9600,1) = usb.USB_DEVICE Then AStream.Initialize(usb.GetInputStream,usb.GetOutputStream,"") AStream.Write(Array As Byte (0x0f)) after that I can see in the debug watch window the entry "Astream / ain / buffer / 0..99" my received bytes. How can I use this Bytes in my program ? (without events) and how can I get the count from the received bytes ? (without a event)
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2017 #2 You cannot use AsyncStreams without the events. The NewData event will be raised whenever there is data available. Upvote 0
You cannot use AsyncStreams without the events. The NewData event will be raised whenever there is data available.
W wroyw Member Licensed User Mar 13, 2017 #3 I don't understand why ? I can see the data at debug mode in the watch window : UsbSerial.driver.mReadBuffer ... When I can see it there why not in ma program ? Upvote 0
I don't understand why ? I can see the data at debug mode in the watch window : UsbSerial.driver.mReadBuffer ... When I can see it there why not in ma program ?
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2017 #4 This is how it was designed. Upvote 0