Python interface for the Firmata (http://firmata.org/) protocol. It is compliant with Firmata 2.1. Any help with updating to 2.2 is welcome. The Capability Query is implemented, but the Pin State Query feature not yet.
MIT License
575
stars
193
forks
source link
Error obtaining data when multiple sensors at the same time are used on a ArduinoUno #123
I tried to collect multiple datas from multiple sensor but I obtained this error.
Traceback (most recent call last):
File "C:\Users\USER07\PycharmProjects\sensor\main.py", line 14, in
Left_index = Robotfinger("Left Index", "left", "1", port, 1)
File "C:\Users\USER07\PycharmProjects\sensor\robotfinger.py", line 12, in init
self.board = Arduino(port)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\pyfirmata__init.py", line 19, in init
super(Arduino, self).init(*args, **kwargs)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\pyfirmata\pyfirmata.py", line 89, in init
self.sp = serial.Serial(port, baudrate, timeout=timeout)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\serial\serialwin32.py", line 33, in init
super(Serial, self).init(*args, **kwargs)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\serial\serialutil.py", line 244, in init__
self.open()
File "C:\Users\USER07\PycharmProjects\sensorNick\venv\lib\site-packages\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM7': PermissionError(13, 'Access is denied.', None, 5)
I tried to collect multiple datas from multiple sensor but I obtained this error. Traceback (most recent call last): File "C:\Users\USER07\PycharmProjects\sensor\main.py", line 14, in
Left_index = Robotfinger("Left Index", "left", "1", port, 1)
File "C:\Users\USER07\PycharmProjects\sensor\robotfinger.py", line 12, in init
self.board = Arduino(port)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\pyfirmata__init.py", line 19, in init
super(Arduino, self).init(*args, **kwargs)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\pyfirmata\pyfirmata.py", line 89, in init
self.sp = serial.Serial(port, baudrate, timeout=timeout)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\serial\serialwin32.py", line 33, in init
super(Serial, self).init(*args, **kwargs)
File "C:\Users\USER07\PycharmProjects\sensor\venv\lib\site-packages\serial\serialutil.py", line 244, in init__
self.open()
File "C:\Users\USER07\PycharmProjects\sensorNick\venv\lib\site-packages\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM7': PermissionError(13, 'Access is denied.', None, 5)