We wanted to incorporate a game with some sort of hardware, so we came up with the idea to create a pong game using some sort of hardware to control the paddle. We landed on ultrasonic sensors due to their ease of setup and use.
What it does
There are two ultrasonic motion sensors that each control a paddle. We also have a highscore leaderboard that runs on a Django web framework that holds and returns the top 5 scores to the person playing the game. The top scores are shown on an LCD screen that is connected to the Raspberry Pi running the game.
How we built it
We built the game using the pygame framework on a Raspberry Pi. The ultrasonic sensors are connected to the Pi through the GPIO headers on the Pi. Our Django web server runs on another Pi and holds all scores sent to it. When requested, the server will return the highest 5 scores to the user, which display on the LCD screen.
Challenges we ran into
We were very new to the pygame interface, so learning the API was a big challenge. Networking between the client and Django server also took some work to accomplish successfully.
Accomplishments that we're proud of
Everything works better than we intended when coming into the project, including the LCD screen. Coming into the contest, we didn't plan on using an LCD screen, so being able to get that up and running with some help from the documentation for the screen was a big success.
What we learned
We learned a lot about web development on the Django framework and how to correctly get two hosts to communicate.