Pcomp Lab: p5js sketch using potentiometer
This week, I used the analog input that I received from a potentiometer to execute a digital output on a p5js sketch.
My Arduino code command said to read the analog input it received from pin A0 and map the 0 – 1023 bits to 0 – 255 bytes.
I then coded circles in my p5 sketch and mapped the radius of the circle to the bytes it was receiving from my potentiometer. Hence, as I turned the knob of my potentiometer, the radius of the circles increased and decreased respectively. To view the final outcome, go the video linked below.