Sending Multiple Serial Data using Punctuation

I entered code that sent output data from two potentiometers and a pushbutton into the Serial Monitor, separated by commas.

It wasn't clear to me why the pushbutton output, when the pushbutton wasn't pushed, why the 0 and 1 alternated. I knew it was working fine because when I pushed the button down, I got a consistent 0 reading. I changes the resistor to 10 kilohnm and it did not resolve the problem.

img_1177_noAudio_480p.mov

A p5 sketch to control microcontroller LED from p5

I made a p5 sketch that was able to draw a dot on a screen in response to potentiometer readings, moving a white dot across the screen. When I pressed the pushbutton, the circle disappeared.

Screen Recording 2021-10-21 at 20.45.46.mov

The Serial Monitor printed "hello" until in typed in some keys into the output box; when I did this, it printed out the three values (two potentiometer and one pushbutton) values at that moment.

Screen Shot 2021-10-21 at 20.57.27.png

I wrote code to make the above sketch more reliably by having a byte be sent to p5 when the Arduino port is open.

We will use this functionality to build an Etch-a-Sketch for our Project 2.