SparkFun will be closing early at 3:30 Friday 5/27 and remain closed Monday for Memorial Day (5/30). Orders placed after 2pm MT on Friday (5/27) will process and ship out on Tuesday (5/31).
We all know the SparkFun community likes to shoot dice - we are a rough and tumble crowd, for sure. Of course, dice can be a bit frustrating since, for the most part, dice games are pure blind luck. Here is a nice Arduino project from Mike Cook that takes the luck out of playing dice.
Based off a game from Ian Stewart's book "The Cow Maze," this game is essentially a math puzzle where the user plays against the computer. It works like this: A number is displayed on the screen, which is called a "heap." You start the game by taking the die and placing it on the sensor with the number you want facing up. This number is subtracted from the heap and then the computer takes a turn. The goal is to hit exactly zero without going over. The two catches are that you can't use the same number twice in a row and you can't use the number that is facing down. So if the computer "throws" a four, you can't use four or three.
As far as construction of the game goes, it consists of an ATmega with Arduino bootloader, five hall effect sensors, an LCD screen, and a few other bits and pieces. The die itself has been outfitted with magnets in place of the typical dots and the hall effect sensors are arranged in such a way that they can detect which way the die is facing. The gameplay itself is controlled by some very clever programming and a "move matrix." Everything is contained in a nice custom enclosure that turns the game on when it is opened and off when it is closed. Mike does a very nice job of documenting this project at his website - check it out! Very nice work!