Marble Disorder is a borderline case of Marble Madness :)
It simulates a marble maze by sensing the box's orientation with 2 tilt switches.

Stop the press: there's a new and more intuitive version that doesn't require the spin knob (See video).

I keep documenting the original version below for historical purposes, but don't watch this - watch that.
Bonus game: The Marble Disorder box is compatible with Ariadne. (the only difference is the tilt switches).
Build once, play twice :)

Step 1: Hardware and software

Note: the new version is a bit different (and requires less components).
It is advised to build the new version (much more fun to play).

 You'll need:
  • An Arduino
  • A Hitachi HD44780 compatible LCD display (I used 16x2, but 20x4 should work too)
  • 2 tilt switches
  • A pushbutton
  • 3 10K Ohm resistors (pull-up for the tilt switches and the buttons)
  • 2 10k Ohm potentimeters (one for spin control and [an optional] one for LCD contrast)
  • Optional piezo speaker
See breadboard diagram.


The code is here.
The maze generation algorithm is the same as Ariadne's (See explanation there).

If you connect the piezo speaker, you can mute it by setting MUTESOUND  to 1.
Actually - this is the default :)
Why have the speaker and mute it? Glad you asked:
Like I've mentioned, you can also run Ariadne's code on this box.
Ariadne only beeps when you hit a wall (i.e. you've made a mistake). This can be avoided.
Marble Disorder beeps whenever there's a spin (i.e. when both tilt-switches allow the marble to move to 2 different cells, and the spin potentiometer determines which one).
This can't be avoided - so you end up with a pretty noisy game. It does help play the game - but I'm not sure it's worth the hassle of all those beeps.
Another option is to put a switch on the piezo speaker (something my Electronic Brick shield doesn't allow).
Cool, but next time use a graphical lcd (128x64 for example), and an accelerometer and it will be way cooler...
You're right, but this is all I have at the moment. I've only made a single mail order since I <a href="http://www.instructables.com/id/Fairly-Simple-Simon-my-1st-Arduino-project/">got a bare-bones freeduino</a>&nbsp;(about a month ago). I've ordered 2 things that were called something like &quot;starter pack&quot; and I'm playing with what I got.<br> An accelerometer and an OLED <em>are</em> on my wish list (so sooner or later I'll most probably write what you propose, and maybe throw in a few treasures and monsters once I'm no longer limited to 8 glyphs), but it will take some time before I can make another mail order (moving soon to the other side of Thailand, so no snail mail address and not much money at the moment), and then it's servo time (robotic traditional Thai shadow puppets).<br> Glad you like this. Thanks.
Robotic shadow puppets is something you MUST video if you do it. Excellent idea.

About This Instructable




Bio: Sucks at soldering, compensates with coding. Twitter: @TheRealDod Twister/github/etc.: @TheDod Diaspora: thedod@diasp.de
More by thedod:Cheap solderless reset button for Raspberry PiMake Seedstudio's I2C LCD monitor work with an old ArduinoThermoscope - 16x2 LCD thermometer with S/M/H graphs
Add instructable to: