From the Forums: Reaction Game for Circuit Playground Express | #circuitpython #adabox

Inspired by Simple Simon, AdaBox subscriber Ron wrote on the forums about this simple and fun Reaction Game for the Circuit Playground Express!

Adabox006 delivered my first CPx. I recently purchased the Feather M0 Express but hadn’t even put headers on it yet so the CPx was my first real chance to play with it and Circuit Python. I pretty quickly had the idea to use the 10 neopixels to create a game that tested reaction time and it was quite simple to do. Below I will described what I used, link to a video of the game in action, as well as link to the readme and code.py on Github.

The BOM is trivial as it only requires the CPx and a power source. You can power it from a USB cable but that’s not very convenient since you need to hold it in your hand and react quickly. I power mine with a small lipo battery I attached to the back of the CPx using Scotch double-sided tape but it can also be powered using the AAA holder that came with Adabox006.

  • The neopixels will cycle counter clockwise. All will be blue except one which will be red which is the player’s target
  • The object of the game is to touch the pad A7 right when the one LED changes to red (random for each game)
  • When first started the neopixels will all flash blue except for #1 being RED indicating the initial difficulty setting of 1 (easiest)
  • Press push button B to start the game. It will turn off all of the neopixels for 1 second so you can prepare then begin cycling until you touch A7
  • If you get it right a little victory tone set is played and all the neopixels turn GREEN
  • If you miss then there is a sadder tone and the neopixels go RED
  • You can hit push button B to play again
  • If you want to increase the difficulty press push button A. Difficulty is 1 to 5 and the number of RED neopixels shows the current difficulty setting
  • Difficulty 5 has the game run as fast as it can

Read more here and check out the code repository here on GitHub.


Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in! adafruit.com/mastodon

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — NEW PRODUCTS – 22-pin 0.5mm pitch FPC Flex Cables for DSI CSI or HSTX – 5cm / 10cm / 20cm

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: The latest on Raspberry Pi RP2350-E9, Bluetooth 6, 4,000 Stars and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — IoT Vulnerability Disclosure, Decorative Dorm Lights, and more!

Maker Business – Adafruit Daily — A look at Boeing’s supply chain and manufacturing process

Electronics – Adafruit Daily — Autoscale is cheating!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.