Cube Switch Game Update – Code Is complete

The code and the circuit for the game is complete. We only need to fabricate the cube and run the Arduino wirelessly using Bluetooth. The game starts by hitting the start button all the way on the right. The user must hit the button of the corresponding LED within the allotted time. This amount of time shrinks with each button press until the user loses, at which point all the LEDs will flash.

Continue reading “Cube Switch Game Update – Code Is complete”

Cube Switch Game Update – No Timer Yet

An update to the progress of the game we are making for our midterm P Comp project. We currently have the circuit working without any count down timer. In the video below you can see that I am hitting the start button on the far right to activate the game. Next, I am matching the button I press to the LED that is lit up.

You have noticed that the analog pots are now replaced with buttons, and this was done just to simplify. As time allows, we will make some functions to allow us to switch out the buttons for different analog sensors.

Beginning Stages of Cube Switch Game

For the P Comp midterm, Marco Wylie and I are working on a game that is kind of mash-up of bop-it and a fidget cube. The device will be a box with LEDs and various switches/buttons on 5 sides (one side will have a handle and the on/off and start buttons). Our intention for how the user will interact with the game is below.

  • Flip the power switch to on.
  • Press “start” button to activate it.
  • An LED on a random side will light up and the user will have 10 seconds to hit the switch on the corresponding side.
    • If the user successfully hits the switch in time, another random side will light up and the user will have 9 seconds to hit the switch on that side… and so on. The time to hit each switch will decrease by 1 second every time.
    • If the user misses the switch in the allotted time, they lose and all the LEDs will flash. The game is over.
  • Once the game ends, the user can hit the start button to play again. Or turn off the power when he/she is done.

I am currently working on building the basic circuit and Arduino program for this. Here is the circuit that I built. It has pots, buttons, and LEDs that are each connected to the appropriate digital and analog pins.

So far I have set up the code so that I can get the LEDs to light up randomly when a button is pressed. I will need to add to the code so each LED is tied its button and so that it is connect to a timing system. Here is a short video and the code I have so far for the random LEDs lighting up.