Battleship

Description

Click here for a demo!

This is a simplified version of the classic game, Battleship. It uses a microcontroller with inputs from buttons and a joystick to select locations. The 8x8, bicolor LED display shows the cursor(orange) and remembers the location of misses(green) and hits(red) between 2 players.

How It Works

This device waits for a green button input from each player to confirm their ship configurations. After confirmation, player 1 starts their turn by using the joystick to move the cursor on the display. The player can mark any spot on the screen and the device reports if the location resulted in a “hit” or “miss.” Both players take turns until one player reaches 5 hits. After a player scores 5 hits, their respective LED flashes to indicate a winner. The device then resets to the ship configuration state and waits for confirmation again.

Above is the FSM that manages the flow of the game.

Significant programming challenges were encountered when displaying the cursor correctly. Below is an overview of the function to move the cursor.

Fusion360 was used to model the system enclosure as well as the custom PCBs.

Future updates to this system include a PCB revision, a state for moving ships, and more games!