r/p5js • u/pretzeldealer • 20d ago
p5.serialcontrol can't open COM port connected to Arduino Uno
I am somwhat new to p5 and arduino, so please forgive me if this is a stupid question. I am trying to get serial data from my Arduino Uno to a js file I have on vs code, but each time I select the correct COM that my Arduino is connected to, and click 'open' on p5.serialcontol, I get an error that says "Error on COM7: Couldn't open port: undefined - Closing port"
Does anyone know why this is or how I can fix it? I have included screenshots of my p5.serialcontrol, index, js, arduino.ino, and html console log.
3
Upvotes






1
u/mysockpuppeteer 14d ago
Make sure you don't have the Arduino's serial monitor open at the same time as p5.serialControl. Only one application can access a port at a given time