Giter Site home page Giter Site logo

eecs149-proj's Introduction

EECS149/249A Final Project - Bop It! Rhythm Game

Sanga Park, Seiya Ono, Ryan Tsang, Jehan Yang

Video


Setting up a lab computer:

cd ~/buckler/software
git clone https://github.com/onibrow/eecs149-proj
cd eecs149-proj
./setup_vm

Proposal (10/25)

Spreadsheet

Project Goal

We will implement a discrete note, single dimension rhythm game similar to Guitar Hero where the player is required to, on beat, actuate inputs from a pool of predefined discrete buttons. We will take this style of gameplay and translate into a Bop It driven hardware and LED display for the beat map.

Project Approach

The gameplay with be modeled as a state machine that keeps track of the state of the game (in game play, idling, song selection, etc). The sensor inputs will generate interrupts that trigger different events within the game. Timing and synchronicity will be very important to make sure the LEDs are lighting up on cue with the music. As a final product, we would like to seamlessly take input from the player and translate that to well timed gameplay with LED signals and music.

Getting out of dependency hell

  1. Try to compile. What library is it missing? ex: blah.h
  2. Does the file exist in the sdk? Find it by going to the sdk folder ~/buckler/software/nrf52x-base/sdk/nrf5_sdk_15.3.0 and running find . -name 'blah.*'. Take note of the directory the header and C file are located in.
  3. Edit eecs149-proj/vm_setup/Includes.mk. You will need to add 2 Lines:
    1. Near line 180, the SDK_HEADER_PATHS should end and become SDK_SOURCE_PATHS. Add a new line at the end of the header paths and add the directory you found in step 2 for the header file. You might want to check if that directory is being checked already. ex: SDK_HEADER_PATHS += $(SDK_ROOT)external/components/
    2. Near line 270, the SDK_SOURCE_PATHS should end and is followed by ifdef SERIALIZATiON_MODE. Add a new line at the end of the source paths and add the directory you found in step 2 for the C file. Similarly, you might want to check if that directory is already being sourced. ex: SDK_SOURCE_PATHS += $(SDK_ROOT)external/components/
  4. Edit eecs149-proj/vm_setup/Board.mk. You will need to add 1 Line:
    1. Near line 95, the list of BOARD_SOURCES should end. Add the C file at the end of the list (make sure to terminate with a \). ex: blah.c\
  5. Repeat the above steps for all dependencies.

Notes

Meeting MP3 files are compressed so they need to be decoded to be played on a DAC -> this isn't particularly ideal so we will switch over to WAV files which are uncompressed. From Audacity, we can see that we can save them in various formats (16 bit or 24 bit PCM), which will allow us to basically read in binary and shove them into either the I2S registers or over I2C. Here's a tutorial on how to play WAV files and goes over their limitations.

Useful Links:

nRF52 Product Spec

Nordic SD Card

Nordic Timers

SparkFun's Intro to SPI

RPi WS2801 SPI Interface

WS2801 Datasheet

Adafruit WS2801 RPi SPI Library

Audio Python Syncing

RPI GPIO Interrupt Handling

eecs149-proj's People

Contributors

onibrow avatar r-tsang avatar jehanyang avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

r-tsang rctsang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.