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

Check for ports already in use before connecting to serial port #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

01baftb
Copy link

@01baftb 01baftb commented Jan 16, 2021

Hi, I would like to a propose a possible solution to the previously posted issue #100. I am excited for contributing to an open source project for the first time. Please forgive me if proposed solution is incorrect.

Summary of issue and solution:
If a user tries to open a port that is already in use, then serial.serialutil.SerialException error will occur. To minimize occurrence of this issue, every time a Board() object is created, we should check to see if the port was already opened by pyFirmata previously by using a class attribute, _boards_in_use that keeps track of all serial ports opened by pyFirmata.

@Abhi011999
Copy link

I second this PR. Please check and merge.

@YmClash
Copy link

YmClash commented Apr 9, 2024

me too pls

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

Successfully merging this pull request may close these issues.

3 participants