Drawdio

Draw audio with drawdio. You might think that this pen is magic, and it might just be. Drawdio turns (almost) everything that is conductive into an instrument. You can either make music by drawing a picture or by touching the tip of it to different conductive things around you. See some examples of ways to use it in this video.

Materials

  • 1 Arduino Uno board
  • 1 Education Shield
  • 1 breadboard
  • 1 piezo speaker
  • 1 1M ohm resistor
  • 1 black jumper wire
  • 4 colored jumper wires
  • 1 9B pencil
  • Masking tape

Instructions

  1. Attach the shield onto the top of the Arduino board.
  2. Using a separate breadboard, connect a 1M ohm resistor between digital pin 2 and digital pin 3.
  3. Connect the piezo speaker across the on-shield breadboard gap and connect one leg to digital pin 8 and the other to GND.
  4. Tape a pencil to a loose jumper wire – the metal part must contact the exposed graphite.
  5. Connect the jumper wire to digital pin 3 through the separate breadboard.
  6. Connect the Arduino assembly to the computer, upload example Drawdio and draw some audio.

Code

Find the code in File>Examples>EducationShield>Block3-Magic>Projects>Drawdio

How it works

  • The EducationShield and CapacitiveSensor libraries are included.
  • pitches.h is included, the file containing the definitions of the notes.
  • The CapacitiveSwitch and Melody objects are declared, me and speaker.
  • The CapacitiveSwitch and Melody variables are declared.
  • Nothing happens in setup().
  • The variable value is declared to hold the read value from the capacitive sensor. If the read value is lower than lowerThreshold, value will be equal to 0.
  • The variable pitch is declared.
  • If value is more than 0, pitch is assigned a value mapped from lowerThreshold and upperThreshold, to toneLow and toneHigh.
  • Else if value is not more than 0, pitch will be equal to 0.
  • A tone is played using the variable pitch
  • loop() continues to loop.

Troubleshooting

  • Refer to the illustration and double check your connections. Make sure the shield and jumper wires are firmly connected.
  • Metallic objects are conductive, but may not work for Drawdio. Water, human skin, fruit, plants and pencil drawings make better use for Drawdio. Use File>Examples>EducationShield>Help>CapacitiveSwitchTest to experiment on the capacitance of different objects.
  • If using pencil drawings, make sure the lines and shapes are broad and thick. Try touching one end of the object when you are using Drawdio.
  • See the capacitive sensor reference for more explanation.

Learn by doing

  • Fine tune Drawdio, so that it’s more accurate with the objects you’re using.
  • Change the sound Drawdio can play.
  • Use the most creative material you can find for Drawdio.