Simple Game With the Spark IO Core

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts and Prerequisites


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


  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.

Be the First to Share


    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    3 Discussions


    5 years ago on Introduction

    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!)


    Reply 5 years ago on Introduction

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