Table Tennis Training Device With Scratch

by Ray chen in Circuits > Arduino

48 Views, 1 Favorites, 0 Comments

Table Tennis Training Device With Scratch

unnamed (3).jpg
unnamed.jpg
螢幕擷取畫面 2024-08-29 174723.png
2024年8月29日

This is a training device using Arduino, designed to help you practice the side shuffle step in table tennis. The trainer uses Scratch programming and aluminum foil to detect when the ball is hit. When an LED light on either side turns on, you must quickly hit the ball in that direction. The Arduino will then control Scratch using the keyboard to make a character fire a projectile at a monster, reducing its health by one. When the monster’s 50 health points are depleted, the game ends.

Supplies

  1. Arduino Leonardo board
  2. Breadboard
  3. Several jumper wires
  4. Plastic corrugated board
  5. 2 LED lights
  6. 4 pieces of aluminum foil
  7. 1 computer
  8. 2 ping pong balls

Connect the Wires

  1. Connect two aluminum foil buttons to D7 and D9 on the Arduino.
  2. Connect two LED lights to D6 and D8 on the Arduino.


Make the Box

unnamed (8).jpg
  1. Use the plastic corrugated boards of sizes 10 cm x 15 cm (2 pieces), 10 cm x 20 cm (2 pieces), and 15 cm x 20 cm (2 pieces) to make a box to hold the Arduino board and breadboard.
  2. Drill three holes in the box and thread the wires out from inside.
  3. Connect the USB cable from inside the box to the computer.
  4. Thread the wires out of the box and secure them on the outside.


Create the Ping Pong Ball Detection Device

unnamed (2).jpg
unnamed (1).jpg
  1. Use the plastic corrugated boards of sizes 45 cm x 3 cm (2 pieces), 48 cm x 3 cm (2 pieces), 4 cm x 7 cm (2 pieces), 3.5 cm x 3.5 cm (2 pieces), and 17 cm x 9 cm (2 pieces), along with two ping pong balls, to create two devices according to the diagram.
  2. Attach the LED lights and aluminum foil switches to the devices as shown in the diagram.


Connect to Scratch

  1. Go to the Scratch interface using the provided URL.

https://scratch.mit.edu/projects/1060381503/

Upload the Program

  1. Upload the program.
  2. Click the green flag in Scratch.

Test

2024年8月29日
  1. Ensure the LED lights turn on and off correctly when the ball is hit.
  2. Ensure that after hitting the ball, the character in Scratch fires a projectile that hits the monster.