p5 and Arduino
Updated: Oct 17, 2018
For this week, I have explored the serial communication between p5.js and Arduino. It was a hot mess when I was first trying out the analog input from Arduino to control the graphic in p5. Through the communication there are so many factors that need to be altered for these two system to communicate: the bytes, the language of print/println/read/write/console.log etc. After I finally figure out how to communicate between them, I used one potentiometer that controls the size and rotating speed of one graphic(the rotating triangle) and the quantity of the other graphic.
From there I started exploring how to input two analog controls and it was so difficult for me to translate the two different analog input value into p5 to make different changes for the animation, but eventually I was able to use two potentiometers that control the size and rotating speed of one graphic(the rotating triangle) and the quantity of the other graphic separately. Then I tried to make a really simple game that the two potentiometers controls the movement of a candy to move through the canvas avoiding the pumpkin baskets.