https://itp.nyu.edu/physcomp/labs/labs-serial-communication/lab-webserial-input-to-p5-js/

I begin by setting up the breadboard as instructed and uploading the code to Arduino IDE. Below is the breadboard and the interaction in the serial monitor when the potentiometer is toggled.

IMG_7662.HEIC

Screen Recording 2023-10-23 at 5.22.33 PM.mov

Now I migrate into the p5 WebSerial Library. I upload the code but realize it does not work in safari so move to chrome.

Screenshot 2023-10-23 at 5.18.40 PM.png

Screenshot 2023-10-23 at 5.19.05 PM.png

Screenshot 2023-10-23 at 5.20.37 PM.png

I cannot figure out how to solve this problem: portConnect is not defined. I discover it is because portConnect is defined within the draw function. I change the code and now my potentiometer reads out in the console log, but it is not very smooth or stable:

Screen Recording 2023-10-23 at 5.32.17 PM.mov

Then I uploaded the code for the graph! Works but not very stable.

IMG_7664.MOV

I move on to the stage to visualize the inputs as a string but it does not work for me:

IMG_7666.MOV