Table Tennis Training Device With Scratch
by Ray chen in Circuits > Arduino
48 Views, 1 Favorites, 0 Comments
Table Tennis Training Device With Scratch
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
- Arduino Leonardo board
- Breadboard
- Several jumper wires
- Plastic corrugated board
- 2 LED lights
- 4 pieces of aluminum foil
- 1 computer
- 2 ping pong balls
Connect the Wires
- Connect two aluminum foil buttons to D7 and D9 on the Arduino.
- Connect two LED lights to D6 and D8 on the Arduino.
Make the Box
- 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.
- Drill three holes in the box and thread the wires out from inside.
- Connect the USB cable from inside the box to the computer.
- Thread the wires out of the box and secure them on the outside.
Create the Ping Pong Ball Detection Device
- 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.
- Attach the LED lights and aluminum foil switches to the devices as shown in the diagram.
Connect to Scratch
- Go to the Scratch interface using the provided URL.
Upload the Program
- Upload the program.
- Click the green flag in Scratch.
Downloads
Test
- Ensure the LED lights turn on and off correctly when the ball is hit.
- Ensure that after hitting the ball, the character in Scratch fires a projectile that hits the monster.