Introduction: Simple Game With the Spark IO Core
This is the first time I've ever played with the Spark IO or its development package, so I made a simple game called Caffeine King to test it out. Directly beneath three of the lights (Neopixels) on the round disc (Sparkbutton shield), are three buttons. The game starts with a single Neopixel illuminating and turning back off. If Neopixel #3, #6, or #9 lights up, you have a short duration of time to activate the button beneath the pixel. If you activate the button in time, the light will turn off and another Neopixel will illuminate elsewhere. Each time a button is pressed within the allotted time, the duration of time the Neopixel is lit decreases by 20%. If a button is not pressed in time, all of the Neopixels light up and the game starts over. Caffeine King is best played and played longer with 3 players.
Step 1: Parts and Prerequisites
- Spark IO Core
- Spark IO Core USB cable
- Computer for programming
- You must already have the Spark IO Core communicating with your computer. This is a monumental task in itself. Good luck and know that you'll finally get it working just before you open a window and toss it into the alley.
- You must have a Spark IO account to program the Core.
Step 2: Plug It In
Join the Core, Sparkbutton, and USB cable. Plug the USB cable into the computer and navigate to the programming screen on the Spark IO website.
Step 3: Copy and Upload the Code
Once you are in the programming screen, copy the contents of the "caffking.txt" file attached to this step and paste the contents into the programming screen. Next, select the Lightning-shaped button to upload the code.
Once the main LED on the Core starts slowly pulsing cyan, the game will begin.