I'm trying to use the cvzone module to connect my python file to arduino but i cant seem to connect to my port "COM3" even though i made sure that it's turned on (arduino shows Port: "COM3")
from cvzone.SerialModule import SerialObject
import time
arduino = SerialObject("COM3") #input arduino port number
while True:
arduino.sendData([1]) #Send signals [1] means "turn on"
time.sleep(1)
arduino.sendData([0])
time.sleep(1)
When I run the program, nothing happens and it shows:
WARNING:root:Serial Device Not Connected
I was facing the same issue but when I put my COM port number it working fine. Here is my code: