Overview

In the original Star Trek series, there are a couple of episodes that feature a severely disabled Captain Pike (former captain of the Enterprise) who is immobilized and can not speak. He can only communicate via a little light on the front of his wheel chair. It blinks (and beeps) once for "yes", and twice for "no".

We can create a similar yes/no functionality using our Circuit Playground. We can use the buttons to select "yes" or "no". The speaker can provide the characteristic monotonic "beep", and the NeoPixels can act like the light. In fact, the resulting program is pretty simple. However, it serves as a good way to introduce a fairly advanced coding topic - refactoring.

We will start with a fully functional program and then incrementally go through it and show how it can be "improved" by applying various refactoring techniques.

Ready to get started?

BEEP!

Good, let's go.

Required Parts

This project uses the sensors already included on the Circuit Playground, either a Classic or an Express. The only additional items needed are batteries for power and a holder for the batteries.

Before Starting

If you are new to the Circuit Playground, you may want to first read these overview guides.

Circuit Playground Classic

Circuit Playground Express

Last updated on 2017-11-29 at 01.23.13 PM Published on 2017-01-23 at 04.20.01 PM