Hardware Options: This lesson was originally designed for Adafruit Flora. For new projects, we recommend the Circuit Playground Express which has built-in sensors, speaker, and NeoPixels - making it easier to get started. The concepts and approach work with either board.

Overview

This project creates a wearable musical instrument that plays sounds based on colours it detects. This is an intermediate project - the soldering of the audio codec board requires some experience. This project spans 1-6 lessons depending on scope.

I used this project in a 4 day workshop for 11-13 year olds alongside using MakeyMakey and RPI. I pre-soldered the audio board, neopixel, colour sensor and Flora. I modified the Flora soldering to have jumper cables which the students then wired up on a solderless breadboard. It is this approach that is included in this lesson plan.

Theories covered in this project: Soldering, Circuits, Sensors, LEDs, Power and Programming (Loops, data types, data conversions, code libraries)

Note: This project involves a lot of soldering. This can be challenging in a class setting. Depending on your class' ability and interest you could solder the boards prior to the project and use the breadboard option for the lessons.

Kit List

Option A: Flora Setup (Original)

  • Adafruit Flora
  • Audio Codec Board + Headphone Jack
  • Flora NeoPixel
  • Color Sensor (TCS34725)
  • Perma-Proto Board
  • Conductive Thread + Jumper Wires
  • Solderless Breadboard (for classroom option)
  • Glove + LiPo Battery + Headphones

Option B: Circuit Playground Express (Recommended for new projects)

  • Circuit Playground Express (has built-in speaker, NeoPixels, and light sensor)
  • Color Sensor (TCS34725) - for full colour detection
  • Alligator clips or conductive thread
  • Glove + AAA battery pack or LiPo battery
Why Circuit Playground Express? It has a built-in speaker (no audio codec needed), 10 NeoPixels, and a light sensor. You only need to add the colour sensor for this project. Much less soldering required!

Lesson Breakdown

Take as much time as each step requires:

  1. Solder audio codec and headphone jack (possibly 2 lessons if soldering in class)
  2. Solder NeoPixel and color sensor to the Flora or SEW these connections using conductive thread
  3. Solder Flora to Audio Codec Board or solder jumper cables so the students can wire it up themselves on a breadboard
  4. Load the code, libraries and breadboarding section
  5. Stitch onto a glove and test the code with anything coloured
  6. Debug any issues as a group - share good practice. For students who have a working glove and are not required to help out other students then they can start step 7
  7. Create a musical score image for the students to play. Play and video each piece (Showcase)

Starting the Project

Required Code Libraries

For the project you will need three code libraries:

  • NeoPixel Library
  • Color Sensor Library (TCS34725)
  • Audio Codec Library

Wiring Steps

  1. Step 1: Solder the audio codec board - there are many fine soldering points
  2. Step 2: Wire up the components according to the wiring diagram. This can be completed with conductive thread for a permanent solution
  3. Step 3: Connect the Flora to the soldered audio codec board
  4. Step 4: Stitch the codec proto board to the glove

Connecting the Battery

Make sure that the Flora power switch is off. Connect the battery to the Flora's JST connector - this is the white plastic cube opposite the USB connection. The battery can be secured between the Flora and the Glove. Be careful to connect and disconnect the battery without pulling by the power and ground wires themselves. For a more permanent attachment the wire can be stitched to the glove.

Creativity Phase: 2+ lessons

Once the piano glove is built or breadboarded together this is when the creativity can be encouraged:

  • Play sounds using a simple colour grid to give the students an idea of what each colour sounds like
  • Following this, use different images such as photographs or pieces of art work
  • Students can create their own art piece as part of Computing Lessons or work in a cross-curricular project with your Art Department
  • On the LAST lesson use this for a show and tell or have an event for the school/community showcasing the work that the students have done

Using Colour to Create a Score Sheet

Students can design their own musical "score" by creating colored images. When the glove passes over different colors, it plays different sounds - turning visual art into music!

Curriculum Mapping

UK Keystage 3/4

  • Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems
  • Make appropriate use of data structures such as lists, tables or arrays
  • Design and develop modular programs that use procedures or functions
  • Understand simple Boolean logic (such as AND, OR and NOT) and some of its uses in circuits and programming
  • Understand how numbers can be represented in binary
  • Undertake creative projects that involve selecting, using, and combining multiple applications
  • Develop capability, creativity and knowledge in computer science, digital media and information technology
  • Develop and apply analytic, problem-solving, design, and computational thinking skills

Australia/New Zealand

  • Digital Technologies knowledge and understanding
  • Digital Technologies processes and production skills
  • Design and Technologies knowledge and understanding
  • Design and Technologies processes and production skills