This two week, we use Serial Communication by Processing and Arduino, to make a Basketball Game, using Potentiometer, Pressure Sensor, Touch Sensor.
Here is the circuitry:
Here is the screen of our game:
There is a line as indicator of shot direction, also a rectangle as indicator of shot strength.
Rrotate the potentiometer to adjust the shot direction
Tap the touch sensor to save the status of direction
Press the pressure sensor to adjust the shot strength for original speed of shot
Tap the touch sensor to save the status of shot strength and shoot basketball
Basketball will be shot out according to the saved status before.
If basketball hits the basket, there is a “Good Job!“ text in the center of the window:
Else it will become “You Lose, Tap to Continue”:
Then we make it more fancy with a game box:
Finally, the video of how it works: