Source Code on GitHub
System Architecture | Software Design | Electrical Design | Mechanical Design
The system is divided into 3 major components: the single board computer, the microcontroller driving the servos, and the game system running the game.
The microcontroller is connected to the single board computer using USB serial. The microcontroller accepts movement commands from the single board computer and translates those into servo positions, which are then sent to the servos.
The single board computer is responsible for the processing the image displayed by the game system to determine where the ship and enemies are on the screen, as well as if and where a bullet is on the screen. It uses this information to decide how to move the ship - to react to a situtation it wants to avoid (being too close to a wall or being hit by a bullet) or to lock on to a column of enemies to shoot at. The shooting mechanic is fairly primitive at the moment, simply alternating the firing bar up and down once per second, causing the player ship to fire once every two seconds.
The game system is a Wii running an NES emulator running Space Invaders. It is setup as if a regular human were to play it, but in this system the screen is viewed by a camera rather than human eyes and the buttons are pressed by servos rather than human hands.