So I am creating a video game, similar to this https://circuitdigest.com/microcontroller-projects/ping-pong-game-using-arduino-accelerometer#comment-30863
I currently have a button thats an input to my arduino and whenever I push it, it is suppose to add a ball. I was able to figure out how the position (on/off) value of the button to processing. But I cant figure out how to write a code that adds an ellipse to the game. Ive tried if statements and all it does is add a ball but when the button is not pressed the ball goes away.