Software apps and online services
Hand tools and fabrication machines
To enjoy the fun of playing table tennis on a small desk with friends in a few minutes of free time, I build this project. In this project, the process of swinging the racket to serve the ball is instead by pressing the serve buttons, thus it only needs a small desk to play table tennis.
Arduino Nano: To choose one button from two serve buttons to serve first.
To decide which user scores in each round.
To accumulate the scores of two users separately.
To compare the total scores of two users and decide the final winner.
LCD screen: The users could see who serves the ball first from the screen.
To display the scores of two users separately.
The users could see who serves the ball first from the screen.
To display the winner.
Buttons: By pressing a button to simulate a swing of a racket.WORKING PROCESS:
- The red button and the blue button work as serve buttons and the green buttons are ready-to-serve buttons.
- The green buttons are ready-to-serve buttons.
- The black button is the reset button, users could press the black button to clear their scores.
- To start the game, two users should press the two ready-to-serve buttons (green button) at the same time, then the system would randomly choses one button from two serve buttons to serve first.
- Let's assume the system chooses the red button to serve first, when the user of the red button press the red button, the RGB strip would glow red. And when the rear light of the RGB strip comes on, the front light would automatically goes out.
- If the user of the blue button serve earlier than the user of the red button, the LED light would not lit up. At this situation the user of the red button would earn the score automatically, and this round is over, the system would automatically pick up a button to serve first again.
- And in this round( red button serve first ) the user of the blue button would only earn the score if the user of the blue button press the blue button to serve at the same time as the middle light of the RGB strip lit up. Neither the early tee shot nor the late tee shot will score.
- And if one user scores 11 points of this game, the user would win and the RGB strip would display the color of the user's serve button.
- Connect the left part green button(ready-to-serve button) to Arduino D2.
- Connect the blue button(left serve button) to Arduino D3.
- Connect the black button(reset button) to Arduino D4.
- Connect the red button(right serve button) to Arduino D7.
- Connect the right green button(right ready-to-serve button) to Arduino D12.
- Connects the RGB strip Arduino D9.(you can find the schematic from my attachment)
- Download Arduino IDE from Software | Arduino.
- Download the program for the project from my attachment.
- Import the program for the project to Arduino IDE via selecting File/Open.
- Select Board and Port on Arduino IDE.
- Download ZIP libraries from https://github.com/olikraus/U8g2_Arduino and https://github.com/adafruit/Adafruit_NeoPixel/find/master .
- Add ZIP libraries to Arduino IDE via collecting Sketch/Include Library/Add.ZIP Library.
Compile and upload.