Week 6: Serial Input with Arduino & p5.js
Once I completed the lab, I used serial input to control an existing p5 sketch I made in my ICM class (Figure3&4). This sketch displays an animation of a snowfall with randomized snowflake patterns. Using serial input, I adjusted the sparkle of each snowflake based on the location of the potentiometer. Here are the p5 and Arduino codes that accompany the snowfall project.
Lastly, I completed a new p5 sketch which creates a pattern using rectangles. Three inputs from the Arduino adjust the pattern. The button toggles the rectMode between the center and corner modes. Then one potentiometer adjusts the number of squares that are displayed and the other adjusts the angle between each square. Figure 5 shows the results of this project. Here are the p5 and Arduino codes that accompany the pattern project.