Arduino: the (Frustrating) Minigames Kit

98

2

Posted in TechnologyArduino

Introduction: Arduino: the (Frustrating) Minigames Kit

About: Also known as Ketoleperouch. Idk why.

(Wonderful example casing for this Arduino ^)

Before I start: despite my efforts, I wasn't able to finish the device completely due to uh... time and misfortune. Got even better when my Arduino parts figured it'd be a good idea to stop working at some point, just tough luck for me. You'll want to use this Instructable purely as a potential source of inspiration instead of actually building it. In this Instructable, we'll be using a breadboard as our assembling platform.

Anyway, for those inspired by this Instructable, surpass me in every way and complete what I couldn't. Here's as far as I got:

Step 1: Required Materials

  • 1x Arduino Uno
  • 1x potentiometer
  • 1x I2C LCD display
  • 1x Piezo Buzzer
  • 2x buttons
  • 4x 220 ohm Resistors
  • 3x 10k ohm Resistors
  • 1x Green LED
  • 1x Red LED
  • 2x Blue LED
  • A couple of wires
    (I recommend Jumper Wires if you wish to stick to using a breadboard)
  • 1x Breadboard

Step 2: Setup

I have used a I2C LCD Display here, that explains the potentiometer, SCL/SDA/VCC/GND outputs above the display.

It may be worth noting that the red wires connect to the + / 5V output and (most of) the blue wires to any GND of the Arduino Uno.

Step 3: Code

If you still deem this project worthy of assembling, here's code you can use.
Feel free to fiddle with the code. There's definitely room for improvement.

At this point, the code allows for two minigames:

  1. The Safe Challenge:
    The user has to search a specific value using the potentiometer and click on the A Button (or the left button on the breadboard as shown in Step 2), while having to make sure one of the two blue LEDs does not fade out. The user is able to 'recharge' the LED light using the other button. This has to be done four times (four 'corrects').
    There's a lot to be aware of: the player has a time limit before losing a 'correct', or if the chargeable LED light is overcharged (in other words, having an analogRead value of 256 or higher).
  2. The Quiz:
    Using two buttons representing the A and B answer, the player has to answer questions correctly
    The code might be a tad buggy in this part.

This code also includes an element of frustration that switches the functionality of the A and B button. You can find this line of code in the attemptSwitchButtons() function.
Also note that this code requires the LCD and LiquidCrystal_I2C libraries.

In this code, the Serial imitates most of the LCD's functions as my LCD didn't work correctly anymore, as mentioned before.

Once you have this code in any Arduino compatible IDE (I recommend using the Arduino/Genuino IDE), upload this program to your Arduino using the Upload button.

Step 4: Play, Improve, Whatever

You have reached the last step of this less-frustrating-than-my-minigames Instructable! Plug in your Arduino to any power source using the USB cable and the first minigame will start up.

Good luck playing and improving! This Arduino project along with its code is far from perfect, but I hope I have reached my main goal, which is inspiring you to create something more awesome than this!

Share

    Recommendations

    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Microcontroller Contest

      Microcontroller Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments