Hacker News new | ask | show | jobs
by moftz 2766 days ago
I built something similar for my senior design project. We made a game of Pacman using two little rovers running FreeRTOS with RN-131C wifi modules on a PIC board and an overhead PixyCam connected to a raspberry pi. The rovers had a color sensor on the front and back that would allow it to track a black line on white paper. The overhead camera would feed pacman and ghost positions to the identical rovers. The rovers were commanded by just telling it what to do at the next intersection and what speed to move at. We did most of the heavy lifting on the raspberry pi simply because it's quicker to write A* in python than FreeRTOS C. Once pacman was seen driving over a colored dot on the map, the ghost would be commanded to run from pacman. If the camera saw the two rovers touch, the game was over.

Modularity was pretty key on reducing the work for that project. The rovers ran identical code and had no knowledge whether they were a ghost or pacman. The command router didn't care if the instructions it received came from a AI or a user GUI.

The platform was limited by what the professor provided us. We only bought color sensor arrays. Other teams went with simpler "games" but much more complex sensor processing on the rover. Those teams had much more trouble getting their designs to work, essentially needing two separate code bases.

Half of us were taking a class on AI and the other half were taking network application design so the idea for the game seemed like an easy way to just reuse code from those classes.

1 comments

Great! Our project had the same idea of combining different skills: I was working with ML and my colleague was the TA from a robotics class.