Flora MIDI Drum Glove



Similar documents
Cell Phone Charging Purse

Arduino Lesson 1. Blink

Arduino Lesson 13. DC Motors. Created by Simon Monk

Character LCDs. Created by Ladyada. Last updated on :45:29 PM EDT

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

DS1307 Real Time Clock Breakout Board Kit

Adafruit Proto Shield for Arduino

Tiny Arduino Music Visualizer

Getting Started Guide

Arduino Lesson 5. The Serial Monitor

ROCK BAND 3 WIRELESS KEYBOARD:

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Arduino Lesson 14. Servo Motors

Sending an SMS with Temboo

Building A Computer: A Beginners Guide

Arduino Lesson 0. Getting Started

About your Kobo ereader...5

STB- 2. Installation and Operation Manual

Thank you for downloading this tutorial! Before you get to work, please take the time to read the tutorial thoroughly.

A REST API for Arduino & the CC3000 WiFi Chip

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

GETTING STARTED WITH STUDIO ONE ARTIST

Martin County Amateur Radio Association. Nightfire Kits 1 LED Torch Kit Contents. Description

Set up and Blink - Simulink with Arduino

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable. Created by Simon Monk

DIY Wearable Pi with Near-Eye Video Glasses

STEELSERIES FREE MOBILE WIRELESS CONTROLLER USER GUIDE

How to Make a Pogo Pin Test Jig. Created by Tyler Cooper

#include <Gamer.h> Gamer gamer; void setup() { gamer.begin(); } void loop() {

2.2" TFT Display. Created by Ladyada. Last updated on :15:09 PM EDT

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

1.8" TFT Display Breakout and Shield

7 Mini Tablet User Guide

Board also Supports MicroBridge

LED Wiring and Connections

Sending Data from a computer to a microcontroller using a UART (Universal Asynchronous Receiver/Transmitter)

FOLGER TECHNOLOGIES, LLC 2020 i3 3D Printer Kit

OVERVIEW HARDWARE. Mode buttons. USB Micro socket. Kensington Security Slot. 8x8 playable grid. Mode buttons

Designing a Schematic and Layout in PCB Artist

ECEN 1400, Introduction to Analog and Digital Electronics

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Adafruit SHT31-D Temperature & Humidity Sensor Breakout

Arduino Lesson 17. Sending Movement Detector

Mbox Basics Guide. Version 6.7 for LE Systems on Windows XP or Mac OS X. Digidesign

IR Communication a learn.sparkfun.com tutorial

Document number RS-PRD Revision 05 Date 20/10/2009 Page 1/30

If this PDF has opened in Full Screen mode, you can quit by pressing Alt and F4, or press escape to view in normal mode. Click here to start.

FTDI VCP DRIVER (free) (WIN/MAC/LINUX)

How to Make and Apply Bias Binding by Alisa at Making More with Less (Busy Quilt Mom) for Sew Mama Sew

To Install EdiView IP camera utility on Android device, follow the following instructions:

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

Tablet and Digital Pen Device

Assembly and User Guide

C4DI Arduino tutorial 4 Things beginning with the letter i

Connecting Arduino to Processing a

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

RS232/DB9 An RS232 to TTL Level Converter

Battery Power for LED Pixels and Strips. Created by Phillip Burgess

Basics. Mbox 2. Version 7.0

Per fection star ts here ṬM. Sewing. My Passion. per formance 5.2

PC Tab INSTALLATION MANUAL SECURE-IT, INC. EAST LONGMEADOW, MA / (fax)

RGB LED Strips. Created by lady ada. Last updated on :00:18 PM EST

Manufactured under license from Dolby laboratories. Dolby and the double-d symbol are trademarks of Dolby Laboratories.

Thermistor. Created by Ladyada. Last updated on :30:46 PM EDT

Waspmote. Quickstart Guide

User Guide for Windows 10

-ipad 2: Quick Reference Guide-

TSL2561 Luminosity Sensor

Electronics and Soldering Notes

How to modify a car starter for forward/reverse operation

MIDI Mobilizer. Advanced Guide

LED Origami. Created by Becky Stern

Chord Limited. Mojo Dac Headphone Amplifier OPERATING INSTRUCTIONS

N300 WiFi Range Extender WN2000RPT User Manual

Getting Started What s included Setting up Fitbit One on a computer Mac & PC Requirements... 2

DIY Pocket LED Gamer - Tiny Tetris!

SainSmart UNO R3 Starter Kit

Surveillance System Using Wireless Sensor Networks

QUICK SETUP GUIDE: USB-MIDI Cubase AI4 / Motif XS Editor / Windows

Mini PC Quick Start Guide

Pocket Verifier Quick Start HTC Touch Diamond

USER GUIDE Version 2.0

SwannSecure Wi-Fi Monitoring System

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

The easy way to accept EFTPOS, Visa and MasterCard payments on the spot. Mobile Users Charging your PayClip. 2. Downloading the PayClip app.

Audacity is a free, totally free, audio editing program. Get it here:

GETTING STARTED TABLE OF CONTENTS

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

Google Drive: Access and organize your files

Arduino Lesson 9. Sensing Light

Programming the Arduino

Nighthawk AC1900 WiF Range Extender

Troubleshooting Tips Lifestyle SA-2 & SA-3 Amplifier. Troubleshooting Tips

KOBO EREADER USER GUIDE, JUNE 2011

All About Arduino Libraries

USB HSPA Modem. User Manual

AUTOMATIC CALL RECORDER JAMECO PART NO

Unlock Android Phone with Wearable NFC

Transcription:

Flora MIDI Drum Glove Created by Becky Stern Last updated on 2015-02-19 02:31:07 PM EST

Guide Contents Guide Contents Overview Sew Piezos Circuit Diagram Solder FLORA circuit Code Adding MIDI support to Flora Finishing Touches Use It! 2 3 5 10 11 19 20 25 29 Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 2 of 30

Overview Play your favorite synths by finger drumming! Stitch up four piezos into a glove and use FLORA to transmit signals to your favorite music-making software. Before you begin, read the Getting Started with FLORA (http://adafru.it/dwi) guide! You'll have installed the Adafruit Arduino software by now, OR you can program your FLORA directly from your browser using Codebender (http://adafru.it/dwj). Fancy! You may also want to brush up on your soldering skillz with our guide (http://adafru.it/dri). For this project you will need: FLORA main board (http://adafru.it/dgx) 4x small piezos (http://adafru.it/dyp) USB minib cable (http://adafru.it/dyq) 4x 1M ohm resistors ribbon wire glove (http://adafru.it/dyr) scrap fabric to match glove pencil soldering iron (http://adafru.it/180) and solder third hand tool (http://adafru.it/dxr) heat shrink tubing (http://adafru.it/dik) wire strippers (http://adafru.it/527), pliers (http://adafru.it/1368), and flush diagonal cutters (http://adafru.it/dxq) heat gun painter's tape or masking tape sewing needle (http://adafru.it/dgc) and thread scissors Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 3 of 30

Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 4 of 30

Sew Piezos Start by ironing out some fabric to match your glove. Cut four small pieces slightly larger than your fingertips, and iron a small hem on one side. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 5 of 30

Put your glove on and establish what spots make contact with the table, then mark those spots with a pencil. Thread your needle and double the thread over, then tie a knot at the end of the tails. Stitch through one of your pieces of fabric and affix it to the glove fingertip over the pencil mark with a whip stitch. Be careful not to stitch the glove finger closed! Check periodically to be sure your stitches only pierce the intended layer. Stitch halfway around the pocket, tucking the seam allowance in a you go. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 6 of 30

Stick the piezo in the pocket, then finish stitching it shut, leaving the wire sticking out towards the back of the hand. Tie off and cut your thread. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 7 of 30

Repeat for the other three piezo pockets, and put your glove on to double check they are tapped when you finger drum. We found the best placement was not necessarily on the pad of the finger, for instance the thumb is around to the side and the pinky is across the first knuckle. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 8 of 30

Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 9 of 30

Circuit Diagram Click to enlarge. Four piezos each have a 1M ohm resistor across them, with the red wires each going to a different analog input (labeled D6, D9, D10, and D12). Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 10 of 30

Solder FLORA circuit We're going to extend the piezo wires and also attach a pull-down resistor. Start with one piezo and trim the black wire a little shorter than the red wire. Slide on a piece of heat shrink tubing and strip the end of the wire. Wrap the wire end around one of the resistor's leads (doesn't matter which one), and situate the two in the grasp of your third hand tool. Strip one end on a piece of wire, and wrap this end around the same resistor lead. Solder the two wires to the resistor lead. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 11 of 30

Once soldered, clip the resistor lead short and shield the junction with the heat shrink tubing you added earlier. Now it's time for the other wire-- wrap the piezo's red wire and the other wire around the other side Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 12 of 30

of the resistor, remembering to add a piece of heat shrink tubing before soldering. Use a heat gun to shrink both pieces of heat shrink and repeat this process for the three other piezos. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 13 of 30

Put the glove on and finesse the wires into a position that reduces strain and lets your hand move. Use painter's tape or masking tape to hold the wires in place as you route the ends towards the analog inputs on FLORA. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 14 of 30

Solder each piezo's red wire (or whatever color your red wire became when you extended it) to a different analog input according to the circuit diagram. Solder all the piezo's black wires to ground. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 15 of 30

Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 16 of 30

Before sewing FLORA to the glove, plug in via USB and test your rig using the code on the next page. You'd hate to have to unstitch anything if anything needs re-soldering! Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 17 of 30

Code There are many ways to trigger events on your computer with FLORA. The following simple sketch generates configurable keyboard presses suitable for use with things like NanoStudio (http://adafru.it/dz4) or Garage Band: /* Piezo Keyboard glove Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried & Becky Stern for Adafruit Industries. BSD license, all text above must be included in any redistribution */ const int indexfinger = A9; // the piezo is connected to analog pin 9 (aka D9) const int middlefinger = A7; // the piezo is connected to analog pin 7 (aka D6) const int thumb = A10; // the piezo is connected to analog pin 10 (aka D10) const int pinkyfinger = A11; // the piezo is connected to analog pin 11 (aka D12) const int pins[] = {thumb, indexfinger, middlefinger, pinkyfinger}; char Keys[] = {'z','x','c','v'}; boolean currentpressed[] = {false, false, false, false}; const int threshold = 40; // threshold value to decide when the detected sound is a knock or not void setup() { //while (!Serial) Serial.begin(115200); Serial.println("start"); Keyboard.begin(); } void loop() { for (int i=0;i<4;i++) { delay(1); long total1 = 0; long start = millis(); long total = analogread(pins[i]); Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 18 of 30

long total = analogread(pins[i]); // check if we are sensing that a finger is touching // and that it wasnt already pressed if ((total > threshold) && (! currentpressed[i])) { Serial.print("Key pressed #"); Serial.print(i); Serial.print(" ("); Serial.print(Keys[i]); Serial.println(")"); currentpressed[i] = true; Keyboard.press(Keys[i]); } else if ((total <= threshold) && (currentpressed[i])) { // key was released (no touch, and it was pressed before) Serial.print("Key released #"); Serial.print(i); Serial.print(" ("); Serial.print(Keys[i]); Serial.println(")"); currentpressed[i] = false; } Keyboard.release(Keys[i]); } } delay(5); Adding MIDI support to Flora Advanced users might want to talk straight USB MIDI-- you can do that with FLORA too! You'll have to mod your Adafruit Arduino 1.0.5 installation. The following instructions are derived from PhilB's upcoming OONTZ tutorial (http://adafru.it/dz5). To start, download and install PJRC s Teensyduino package (http://adafru.it/dy3), an add-on for the Arduino IDE. This brings support for theirteensy line of microcontroller boards, including excellent MIDI support. A graphical installer guides you through setup. Make sure to do the Teensification to the Adafruit Arduino IDE so you get both Flora & Teensy support Installing George Werner s TeeOnArdu package then lets us use the Teensy MIDI library on the FLORA. Ladyada made some changes so this package can use the stock Leonardo/Flora bootloader, saving headaches. Click to download TeeOnArdu http://adafru.it/dy4 Installing TeeOnArdu is a little different from other software or libraries. Start by unzipping the Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 19 of 30

TeeOnArdu-master.zip file that you downloaded, that much is normal. The unzipped folder that results should contain two items: a README file and a sub-folder called TeeOnArdu. Locate your Arduino sketchbook the folder where your own Arduino code and related files go (not the Arduino application, but the folder containing your personal work). The location is a little different for each operating system: Windows: (home)\my Documents\Arduino Mac: (home)/documents/arduino Linux: (home)/sketchbook Inside the sketchbook, create a new folder called hardware if one does not already exist. Move the TeeOnArdu folder (the one alongside the README, not its parent folder) into this hardware folder. Start the Arduino IDE. Or, if it s already running, exit and restart it. On the Tools Board menu there should be a new item labeled Flora (TeensyCore). Select this. There s still a little song and dance to be done, but it s easier than MIDI The Old Way. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 20 of 30

You should have previously selected Flora (TeensyCore) from the Tools Board menu. Now, from the Tools USB Type menu, select Serial. Then unplug and re-plug the USB cable. This resets the FLORA bootloader, and for the next 10 seconds it appears to the system as a serial device. Quickly now from the Tools Serial Port menu, select the port corresponding to the Arduino board. From the Tools USB Type menu, now select MIDI. It s necessary when compiling MIDI code. Load the code below into your Arduino IDE. Before uploading the code to the board, press the mini reset button on the Flora to launch the bootloader again. There s a 10 second window to then click Upload. If you miss it on the first try, just try again! If you return to MIDI after working on other Arduino projects and have problems uploading code, remember to do this Serial-then-MIDI selection rigmarole. (You don t need to do this every time you upload code, just when switching back to MIDI from a different Arduino project.) /* Piezo MIDI glove Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried, Phillip Burgess, & Becky Stern for Adafruit Industries. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 21 of 30

Written by Limor Fried, Phillip Burgess, & Becky Stern for Adafruit Industries. BSD license, all text above must be included in any redistribution */ #define LED 7 // Pin for heartbeat LED (shows code is working) #define CHANNEL 1 // MIDI channel number int note; const int indexfinger = A9; // the piezo is connected to analog pin 9 (aka D9) const int middlefinger = A7; // the piezo is connected to analog pin 7 (aka D6) const int thumb = A10; // the piezo is connected to analog pin 10 (aka D10) const int pinkyfinger = A11; // the piezo is connected to analog pin 11 (aka D12) const int pins[] = {thumb, indexfinger, middlefinger, pinkyfinger}; //char Keys[] = {'z','x','c','v'}; boolean currentpressed[] = {false, false, false, false}; const int threshold = 40; // threshold value to decide when the detected sound is a knock or not void setup() { pinmode(led, OUTPUT); // We dont have Serial or Keyboard available in MIDI mode!!! //while (!Serial) //Serial.begin(115200); //Serial.println("start"); //Keyboard.begin(); } void loop() { for (int i=0;i<4;i++) { delay(1); long total1 = 0; long start = millis(); long total = analogread(pins[i]); // check if we are sensing that a finger is touching // and that it wasnt already pressed if ((total > threshold) && (! currentpressed[i])) { //Serial.print("Key pressed #"); Serial.print(i); //Serial.print(" ("); Serial.print(Keys[i]); Serial.println(")"); currentpressed[i] = true; //Keyboard.press(Keys[i]); Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 22 of 30

//Keyboard.press(Keys[i]); //note = LOWNOTE + (i & 0x0F) * 8; usbmidi.sendnoteon(60+i, 127, CHANNEL); } else if ((total <= threshold) && (currentpressed[i])) { // key was released (no touch, and it was pressed before) //Serial.print("Key released #"); Serial.print(i); //Serial.print(" ("); Serial.print(Keys[i]); Serial.println(")"); currentpressed[i] = false; //Keyboard.release(Keys[i]); usbmidi.sendnoteoff(60+i, 0, CHANNEL); } delay(5); } while(usbmidi.read()); // Discard incoming MIDI messages } Now you ll need software on the computer at the other end of that cable. This requires either a software synthesizer a program that generates sounds using your computer s audio hardware or a MIDI patchbay utility, which forwards the MIDI data to a hardware synthesizer. If you ve done music on your computer before, you probably already have one or both of these tools. Otherwise, there are a ton of options out there, many of them free. For example, on Windows there s the freeware Firebird2. Mac has the very basic SimpleSynth or the soup-to-nuts GarageBand. Even Linux has options. Google around for software synthesizer, "MIDI", free and Windows, Mac or Linux and see what you find. There are so many options, we can t walk you through this for every app or operating system. It s usually pretty straightforward though, we re confident you can find something and get it installed and running. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 23 of 30

Finishing Touches Once your glove is functioning properly, it's time to tack everything down. Put the glove on and position FLORA so that the wires don't tug when you make a fist. Tape it down so it stays put before stitching. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 24 of 30

Use plain thread to stitch FLORA's unused pads to the glove. On the side where all the wires come in, stitch around the wires instead of through the pads. Tack the wires in place with strategic stitches along their lengths. Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 25 of 30

Remove the tape and try on your completed drum glove! Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 26 of 30

Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 27 of 30

Use It! Your USB cable will be plugged in while you use the drum glove. You may want to grab a USB extension cable for more freedom of movement! For a similar, yet wireless, project, try the 3D Printed Wireless MIDI Controller Guitar (http://adafru.it/dz3). Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 28 of 30

Adafruit Industries https://learn.adafruit.com/midi-drum-glove Page 29 of 30