Guitar micro:bit CHARGE project

Guitars come in many different styles and sizes, and are used by musicians to create melodies and rhythms! By holding different positions on the strings while strumming, you create different musical notes for listeners.

Let’s get musical and create an electric guitar to rock out with!

The guitar in the project will:

  • play a note when pressing the ground and a tinfoil button at the same time
  • display an icon on the micro:bit as a note plays
  • play a melody when pressing the A button on the micro:bit
A young boy with blonde curly hair and a striped beanie smiles while playing an electric guitar.

Prepare

You’ll need the following items to complete this project:

Build

First, you’ll need to cut out the pieces of your guitar from your chosen material:

SVG file for micro:bit guitar

Laser or Machine Cutter

Cut out the shape of the guitar using the file provided.

We recommend using 3mm Baltic birch wood for your frame, but feel free to get creative and make it your own.

Craft Knife or Scissors

If you don’t have access to a cutting machine, print the template and glue it to your desired material to create your frame.

To keep your project eco-friendly, try using recycled cardboard.

Assemble your Guitar

Next, let’s build our guitar using the micro:bit, CHARGE for micro:bit, alligator clips, and craft materials:

micro:bit guitar step 1 of 10
micro:bit guitar step 2 of 10
micro:bit guitar step 3 of 10
micro:bit guitar step 4 of 10
micro:bit guitar step 5 of 10
micro:bit guitar step 6 of 10
micro:bit guitar step 7 of 10
micro:bit guitar step 8 of 10
micro:bit guitar step 9 of 10
micro:bit guitar step 10 of 10
micro:bit guitar 1
Cut out the guitar template, and gather your required materials.
micro:bit guitar 2
Apply glue to the detail panel of your guitar and attach it to the bottom frame layer.
micro:bit guitar 3
Apply glue to the neck piece of the template and attach it to the bottom frame layer.
micro:bit guitar 4
Cut out three pieces of tin foil. It should be the width of your finger, and long enough to wrap around both the front and back of the guitar’s neck.
micro:bit guitar 5
Use glue to attach the tin foil button to your guitar’s neck. Make sure to space your buttons so your fingers can reach them.
micro:bit guitar 6
Cut a piece of tinfoil for the frame of your guitar. It should be long enough to attach to both sides of your frame. This will act as the “ground” that you use to hold onto your guitar.
micro:bit guitar 7
Attach your micro:bit CHARGE strap using the provided velcro around the body of your guitar.
Attach one end of each alligator clips to the 0, 1 and 2 pins on your micro:bit.
micro:bit guitar 8
Turn over your guitar frame, threading your alligator wires beneath the CHARGE velcro strap. Attach one alligator clip to each of the three buttons on the guitar’s neck.
micro:bit guitar 9
Attach the fourth alligator clip from the “GND” pin, to the tinfoil pad on the frame of your guitar.
micro:bit guitar 10
You’re ready to start coding!
To play a note, remember to hold both the ground button (connected to the black wire) in one hand, and the note button (connected to either the yellow, white, or green wires) in the other.
previous arrow
next arrow

As you build, think about how your alligator clips are attached, the size of your guitar, and any personalization you want to add to your instrument!

Code

Explore the code below to get started using your guitar.

  • Connect your project to the computer and download the starter code to make it work!
  • Review the code comments on each block to learn about how your guitar works, then try testing it in real life.

Improve

Think about how you can decorate and adapt your guitar! How would you modify the sample code provided, or create your own project that includes the following features?

  • A guitar strap or other decoration
  • A reaction when using the “on shake” event
  • A reaction when you play notes in a specific order

Don’t have a CHARGE for micro:bit?

micro:bit guitar

Modify this project by attaching your micro:bit to your guitar frame using elastic bands.

Make sure your micro:bit has power using batteries or a computer connection so that you can still jam out with your friends.

Feeling Stuck? Explore the Knowledge Base for common questions and troubleshooting tips.