I'm still new at Python and I'm trying to create a plant Monitor of sorts using an Arduino. The issue though is that my program cannot connect to the COM4 serial port.
from pyfirmata import Arduino
from pyfirmata import util
board = Arduino("COM4")
it = util.Iterator(board)
it.start()
from Sensors.sensor import sensorBase
soilSensor = sensorBase('a:0:o')
It errors out on the Arduino part with this error:
SerialException("could not open port 'COM4': PermissionError(13, 'Access is denied.', None, 5)")
- I've gone to the device manager and disabled the port and then re-enabled it.
- I've also shut down and rebooted my PC, that also doesn't help.
- I've tried running Visual Studio 2017 with administrative privileges.
- I'm able to type in the python terminal and that works fine, the problem I think lies with Visual Studio 2017.