- Do the labs:
- Lab: Intro to Asynchronous Serial Communications
- Lab: Serial Input to P5.js
- Lab: Two-Way (Duplex) Serial Communication Using An Arduino and P5.js
- Make a serial application that controls one of the animation projects you’ve done in intro to computational media with analog sensor data from an arduino, sent to the browser serially, as shown in this week’s lab
My Mini Project:
For my mini project I used a serial input (potentiometer) to change a p5 sketch I had created in ICM class. The original ICM p5 sketch was a ferris wheel rotating clockwise that when a user clicked the middle button with their mouse, the wheel would rotate the other way, switching from clock-wise to counter-clockwise and vice versa. In addition, if the user pressed their mouse on the button consecutively 8 times, the people on the ferris wheel would fall off.
For this class project I wanted to turn the user interface from a mouse press (digital interface) to a knob/potentiometer (physical interface). Consequently, now when a user turns the potentiometer, the rotation of the ferris wheel switches between clock-wise and counter-clockwise.
What I want to learn:
How to add a digital input (pushbutton) that would make the people on the ferris wheel when pressed. I was having a hard time figuring out how to allow both the analog input and digital input to control different outputs in my p5 sketch.
What I learned:
There are a few ways that I could have coded the p5. I kept them in my p5 sketch, commented out.
Lab: Intro to Asynchronous Serial Communications
Lab: Serial Input to P5.js