• ECE 153B Final Project



    meow meow

Overview / Goal / Purpose

This is a brand new battleship experience

The goal of this project is to recreate the board game battleship on the stm32 board. We got our insight from the GO game in the previous years' projects for using 8x8 dot LED displays for the `board' of the game and using Wii nunchuks to control the pieces.

Our awesome team

Two Computer Engineering Students new to the world of STM32


Coder & Designer


No, Seriously.


Coder & Designer


Block Diagram

This is how we connected the peripherals and STM32 togther

  • Nunchuk 1

    Connected with I2C using port B pin 8 and 9

  • Nunchuk 2

    Connected with I2C using port B pin 10 and 11

  • 8x8 Dot Matrix Led Display 1

    Connected with SPI using port A pin 4 to 7

  • 8x8 Dot Matrix Led Display 2

    Connected with SPI using port B pin 12 to 15


    Are we still gonna use it?

Demo Video
Check out our video presentation


These are the details of the peripherals we used

  • Wii nunchuks

  • I2C protocol

  • joystick with X, Y, and Z value

  • two buttons, Z and C

  • Purchase
  • 8x8 LED display

  • SPI protocol

  • 64 LEDs to program

  • Purchase
  • Termite?

  • UART protocol

  • terminal that displays texts

  • Download

Week -1 (2/7 - 2/11)

finish project proposal

  • Parts arrived!

    Start preparing and planning out our code structure

Week 0 (2/14 - 2/18)

Peripheral setup

  • Communication with Display

    successfully connected SPI with one of the 8x8 LED Display

  • Communication with Wii Nunchuk

    successfully connected I2C with one of the Wii Nunchuk

  • Control Display behavior with Nunchuk data

    Look at this adorable cat ^._.^

Week 1 (2/21 - 2/25)

Peripheral setup & Game Logic Design

  • Communication with Second Display

    connected SPI with another 8x8 LED Display

  • Communication with Wii Nunchuk

    connected I2C with another Wii Nunchuk

  • Design of the Game Logic

    implemented logic for placing battleships and manipulating the board during a player's turn

Week 2 (2/28 - 3/4)

Game Logic Design

  • Ship placing phase finished

    Coded the game logic for placing 4 ships

  • State Machine setup

    Coded the state machine for user to take turns hitting

  • Gaming phase finished

    Coded the state behavior for each state in the gaming state

Week 3 (3/7 - 3/11)

Finalize Game Design

  • Finalize placing phase

    Cleaned up termite outputs

  • Finalize gaming phase

    Updated the hitting behavior

  • Finalize winning phase

    Designed the winning and losing screen