AsyncIO icon indicating copy to clipboard operation
AsyncIO copied to clipboard

asynchronous serial port

Open elseif opened this issue 8 years ago • 1 comments

how use AsyncIO operation serial port communication

elseif avatar Dec 13 '16 04:12 elseif

I've never done serial port communication on Windows, but from what I've read I think you should be able to use the AsyncFileStream more or less as-is, just with the special COM port filenames (ie '\\.\COM5'), as well as fcOpenExisting and fsNone flags. See CreateFile for details.

You can then use the streams Handle property for the serial-specific calls (setting baud rate etc).

Of course ideally I'd make a wrapper for this, and it's something I'd like to do since I recently got an Arduino which I could use for testing.

lordcrc avatar Dec 14 '16 14:12 lordcrc