It was interesting putting together the concepts of physical computing and creating something on screen with processing. It’s definitely a bit of a complicated process to understand the communication between the two channels and how to make it do exactly what you want it to as I realized was happening when I tried to control the paddle with a potentiometer for the brick breaker game I created in processing.
At first I was trying to use a sliding potentiometer which ultimately seemed like it wasn’t working correctly, so I switched it out for the regular potentiometer you see in the video below.
My other mistake was that I was attempting to create the serial event within the Paddle class in the code – it should have been outside of the code and calling myPaddle (name of object) dot xPos to be able to use the Serial values for the variable I want to manipulate.
All in all, the mistakes helped me to better understand how Arduino and Processing communicate with each other.