I'm trying to start an arduino project but every time I try running it it throws an error. I think I might have gotten some of the setup wrong?
I've uploaded the Standard Firmata Sketch to the Arduino Mega and installed pyFirmata. I can't really think of what else I could've done wrong.
Note that I'd already tried in another computer and, while it didn't really work, the board was initialized and it didn't throw any error like this
This is my python code
import pyfirmata as pf
board = pf.ArduinoMega('COM5')
And this is the eror thrown
Traceback (most recent call last):
File "C:\Users\stiky\Desktop\Code\Python Codes\Arduino\test.py", line 3, in <module>
board = pf.ArduinoMega('COM5')
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\stiky\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyfirmata\__init__.py", line 32, in __init__
super(ArduinoMega, self).__init__(*args, **kwargs)
File "C:\Users\stiky\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyfirmata\pyfirmata.py", line 101, in __init__
self.setup_layout(layout)
File "C:\Users\stiky\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyfirmata\pyfirmata.py", line 157, in setup_layout
self._set_default_handlers()
File "C:\Users\stiky\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyfirmata\pyfirmata.py", line 161, in _set_default_handlers
self.add_cmd_handler(ANALOG_MESSAGE, self._handle_analog_message)
File "C:\Users\stiky\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyfirmata\pyfirmata.py", line 185, in add_cmd_handler
len_args = len(inspect.getargspec(func)[0])
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
What am I doing wrong?