Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asynchronous serial port #2

Open
elseif opened this issue Dec 13, 2016 · 1 comment
Open

asynchronous serial port #2

elseif opened this issue Dec 13, 2016 · 1 comment

Comments

@elseif
Copy link

elseif commented Dec 13, 2016

how use AsyncIO operation serial port communication

@lordcrc
Copy link
Owner

lordcrc commented Dec 14, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants