
# pong catapult

One of the easiest robotics projects, with a single motor and repeatable interactions.

Distance where the ball launched could be controlled with motor speed.

Photos and video: [lego-catapult-photos.md](lego-catapult-photos.md)

## Required components

- Lego Ev3
- wifi dongle
- microsd card
- some lego parts
- several ping pong balls


## Steps

1. Install linux on sd card for ev3 brick.
    https://www.ev3dev.org/docs/getting-started/
   1. Download, unzip.
   2. If linux: `sudo dd if=ev3dev-stretch-ev3-generic-2020-04-10.img of=/dev/sdb bs=4M status=progress conv=fsync`
      1. then `sync`
   3. If windows: use win32diskimager or similar app.
   4. Wait 2-10 minutes so OS image is written to the card.
   5. Turn on, connect to wifi.
2. Test app for motors.
   1. Get the project from https://git.makerobots.eu/konstantin/lego-ev3-java .
   2. Update IP address.
   3. Connect motor to port A .
   4. Run gradle deployAndBrickRun task.
   5. When the brick beeped, press the right button to test motor.
3. Assemble a sturdy structure with a motor.
4. Place ball and test.
5. Iterate (structure and code) and try to launch a pong ball:
   - as far as possible
   - as high as possible
   - exactly 30 cm (use the plastic cup or some bowl)
   - exactly 1-meter distance.


   
