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

Use with multiple simultaneous serial ports #11

Open
whaleygeek opened this issue Jul 26, 2017 · 6 comments
Open

Use with multiple simultaneous serial ports #11

whaleygeek opened this issue Jul 26, 2017 · 6 comments

Comments

@whaleygeek
Copy link
Owner

@GemmaMayLatham asked if it is possible to use bitio with a micro:bit while another serial port is connected to another device. e.g. to run concurrently with this project: https://github.com/whaleygeek/punchcard_reader

@whaleygeek
Copy link
Owner Author

The portscan used in both these projects is similar, and was only really designed to detect one device. That means if you use two devices, the portscan.cache file will conflict.

Also, the punchcard reader project uses an older version of the portscan module that doesn't yet run in Python 3.

@whaleygeek
Copy link
Owner Author

The punchcard reader code is not yet Python 3 safe: whaleygeek/punchcard_reader#2

@whaleygeek
Copy link
Owner Author

To make the both work together in the same Python program at the same time, I'll need to make the name of the portscan.cache file configurable, so that both packages could have a different name.

The new version of the portscan module in bitio has a configurable device name (micro:bit for example). We could probably use the device name as part of the cache file name (e.g. portscan.microbit and portscan.cardreader) to generate unique names so that the same device discovery method could be used for both in the same Python program.

It's not a huge change, but not something I want to rush.

@titimoby
Copy link

using another device is cool, but using multiple micro:bit will be even more cool.
do you think it's doable while you code the initial goal of this issue fix?

@whaleygeek
Copy link
Owner Author

It's definitely possible. But I need to think about the best way to surface this functionality, so that it is obvious to the user, and also so that it works as closely as possible to how the micro:bit APIs work (which is one of my goals for this package).

Give me a little bit of time to think about how I want to surface this, but I will report back here.

@titimoby
Copy link

Take the time you need, it was just to note multi micro:bit will be as useful as multiple serial devices.

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