Wednesday, December 12, 2012

Game Cube


Game Cube is an interactive cube with an[RGB]  LED on each face. Game Cube allows its users to appreciate the aesthetic qualities of light and color while implementing interaction with the cube through the rotations of the cube. Game Cube utilizes an accelerometer, as it's primary input, to change the colors of the LEDs dependent upon the position of the cube in the user’s hands, dependent upon the current setting.
 
 

Interacting with the Game Cube is fun and easy. The user can simply pick up the cube and begin by pointing any corner of the cube upward and holding in that position for 3 seconds. After you rotate the cube back to a face user will find his or herself menu interface where each face has a certain color corresponding to a different setting. To pick a setting you need only to rotate the cube such that the desired setting color is faceing upward. The user will know what face is currently selected by a blinking light on the current face that is pointing up. By holding this face in this upward position for 3 seconds, the user will enter the desired setting.
 
 

There are 6 faces and 5 settings. Two of the faces correspond to the same setting (Green).

·         Blue: LightCurrentFace—Lights the current upward face.

·         Red: RandomCube—Rotate the cube to a new upward face and watch as each face is lighted randomly

·         Green: PartyCube—Sit back and enjoy the light show

·         Cyan: ChangeCubeColor—Rotate the cube to a new upward face and watch as the entire cube lights up to the face’s corresponding color (there are 6 available colors)

·         Yellow: ChaseTheLight—Rotate the cube to the lighted face before time runs out! Hurry, you only have 5 lives!

To exit out of any setting, simply point any corner of the cube upward for 3 seconds and then rotate back to a face. This will return the user back to the Menu Interface.
 
 

Technical Details

Input
The only input to the Game Cube interactive system comes from the accelerometer attached to the inside of the Game Cube. The accelerometer works by tracking the x, y, and z positions of the cube in 3-dimensional space.

Output
The output of Game Cube are the light values that correspond to the color of each LED. The input of the accelerometer’s x, y, and z values correspond to the red, green, and blue values of each LED. Different positions of the cube for each of the settings can result in a variety of color combinations.

Construction
The components of Game Cube consist of the 6” acrylic cube, an inner cube composed of foam core to house electronics, an Arduino microcontroller to run the Game Cube program, an accelerometer to track the cube’s x, y, and z position in 3-dimensional space, a group of 6 RGB LEDs with the corresponding wires, 3 shift registers to  connect the abundance of electronics to the Arduino, and a battery to power everything.
 
                               
 

 

 
Software
The code for Game Cube is written in the Arduino programming environment and stored on the Arduino microcontroller attached to the inside of the Game Cube. The software consists of 650 lines of code—5 different settings, a Menu Interface, shift register control, LED control, accelerometer control, and testing/debugging statements.