Code Monkey home page Code Monkey logo

candlejoust's Introduction

Candlejoust

I played this game for the first time at the CCC, using playstation move controllers, and absolutely adored it (even though I lose more often than win.)

Those controllers are somewhat expensive though, and using them requires a computer around to interpret input and determine a winner. I decided to make my own using Arduinos, MPU-6050 accelerometers, and WS2811 LEDs.

The code is super rough right now, but since it's functional it makes sense to stash it in git, and I'd also like to share it with the world!

how to play

Pretend your device is a candle. Your opponent(s) also have a candle. Your goal is to extinguish their candle without yours extinguishing as well.

parts & cost

The cost for a single controller is at most $20 USD, but if you're scrappy about sourcing parts you can definitely bring the cost to <$10 USD. If that's still somewhat expensive, consider using cheaper LEDs and vibration sensor switches instead of the MPU-6050 (you will also need to modify the code.) You can scrap rechargable lithium ion batteries from disposable vapes and other small electronics, though take care to examine the part's data sheet for proper charging procedures. Little USB batteries from dollar stores work great - they usually have a 18650 LiIon battery and charging circuits built in.

Some tips

  • The MPU-6050 seems to require its startup calibration to be done parallel to a relatively level & stable surface
  • MPU-6050s normally require individual chip calibration during programming; I've opted not to bother changing defaults per-chip but if yours seems buggy adjust the calibration values in code.

todo

  • clean up code
  • provide circuit diagrams
  • send the MPU-6050 to sleep when the user has lost (are there other power improvements?)
  • implement a piezo buzzer and/or vibrating motor for further haptic/sound feedback on warning & losing conditions
  • create a 3d printed housing for the electronics & battery

candlejoust's People

Contributors

rtertiaer avatar

Stargazers

 avatar

Watchers

 avatar

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.