Fun little project to make pong using a Raspberry Pi and and oscilloscope set to XY mode.
It uses an 8 bit MAX506 DAC that I had left over from college ( over 20 years ago, but it still works great! )
https://www.maximintegrated.com/en/products/analog/data-converters/digital-to-analog-converters/MAX506.html
The controls are from the two joystcks on an XBox One controller, connected via bluetooth to the Raspberry Pi. At the time of development, it showed up as /dev/input/js0. This can be modified in the header file to suit your own controller input.
Build: gcc -Wall -pthread -o xy xy.c -lpigpio -lrt -lm
Run: sudo ./xy
There are lots of improvements that can be made:
- Finsh score keeping
- Change the angle of ball delfection based on where the ball hits the paddle
- Add sound for ball bouncing, etc.