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

Parts:

  • Spark IO Core
  • Sparkbutton
  • Spark IO Core USB cable
  • Computer for programming

Prerequisites:

  1. 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.
  2. 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.

Comments

author
peppypickle (author)2014-12-18

well done, thanks for sharing this Instructable!

author
stephpalm (author)2014-12-18

This looks awesome! Thanks for sharing. Just a quick heads-up that you're using the Spark Core not the Photon (Photon will be delivered in March - same pinout though!)

author
skinnyrd (author)stephpalm2014-12-18

Thanks for catching my mistake. I made sure to correct it above.

About This Instructable

520views

13favorites

License:

More by skinnyrd:Simple Game with the Spark IO Core
Add instructable to: