From: Neil Smith Date: Fri, 10 May 2013 17:49:19 +0000 (+0100) Subject: Updated README, added pictures to the writeup X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=9ddd797635056931bc8106f5b4103b094cda55bb;hp=74e79c03898bbe4966e737c0e2c7fceaaef4e72d;p=miniband.git Updated README, added pictures to the writeup --- diff --git a/README.md b/README.md index 89a0341..cc4b9b8 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Make your own mini band! You and your friends can form your own finger-sized band and rock out using Raspberry Pi and Arduino. Learn how to build circuits with sensors and outputs and write a simple programme to control your instruments. +## Instructions + +The instructions are in the [writeup directory](https://github.com/NeilNjae/miniband/tree/master/writeup); you'll probably want the [instructions PDF](https://github.com/NeilNjae/miniband/tree/master/writeup/miniband.pdf). Code samples are in the [release directory](https://github.com/NeilNjae/miniband/tree/master/release). + ## You will make: * A guitar @@ -37,143 +41,20 @@ Learn how to build circuits with sensors and outputs and write a simple programm * IDE developer environment for Arduino * Py Serial library - -## Useful links: - -* [Pictures](http://bit.ly/codeclubminiband) -* [Ardunio code](https://github.com/KatJoyWhite/miniband/tree/master/arduino) - - - -## Pull-down Resistors - -You’ll find your analogue inputs receive signal when you don’t expect them to. -This is because there’s electricty floating around in the system, or something like that. - -To fix this, you need to wire each input to ground, through a 10KΩ resistor. - -A better explanation can be found [here](http://arduino.cc/en/Tutorial/DigitalPins). - - - ## Drum Kit Code Club Miniband< -### 1. Make your drums - -Take your 4 piezo buzzers and attach a ring of Sugru (or other modelling material) as shown in the picture. -This will increase the flexibility and resonance of the sensors. Let the sugru set. - -Code Club Miniband - - -### 2. Connect the circuit - -Piezo buzzers generate a small charges when you tap them, so they don’t need a power source. -Connect one lead from your buzzer to one of your analogue inputs, and connect the other lead to ground. -Repeat for each of your drums. It is easiest to use a bread board for making your circuit. -Look at the picture for an example. - -Code Club Miniband - -### 3. Program the Arduino - -Find the appropriate code from the respository and upload to your Ardunio board. - - -### 4. Set up in Scratch - -Find four different drum sounds (or whatever sounds you'd like your drums to make!). Upload the sounds to Scratch. - - ## Guitar Code Club Miniband -### 1. Make your guitar - -Grab your strip potentiomater, a piece of thin card, and a pencil. -Lightly draw round your potentiometer on the card and then use this as a guide to draw out your guitar shape. -(The potentiomater will be the fret board of your guitar). -Cut out and colour in the guitar and stick down the potentiomater. -Tape a pencil or stick to the back of the guitar to make it stiffen the fret board. - -### 2. Connect the circuit - -The potentiomater strip adjusts resistance, so you will need to feed it some electricity. -Run +5V into one of the strip’s outer pins, and ground into the other outer pin. -It doesn’t matter which way around you connect these, but it will affect which the direction -the fretboard runs (high and the top, low at the bottom or vice-versa). - -Signal will come from the centre pin, so connect that to one of your analogue inputs and you should be good to go. - -Code Club Miniband - -### 3. Program the Arduino - -Find the appropriate code from the respository and upload to your Ardunio board. - - -### 4. Set up in Scratch - -Find five different guitar sounds and upload to Scratch. - - ## Maracas Code Club Miniband -### 1. Make your maracas - -Cut 2 short lengths of drinking straw for your maraca handles. -Using Sugru (or other modelling material), make 2 maraca heads by rolling it up into balls. -Push the maraca heads onto the straws and mold into a maraca shape. -Connect lengths of wire to the connectors of the 2 tilt sensors and then push each sensor into a straw until it presses into the Sugru. -Leave the Sugru to set. - -Code Club Miniband - -### 2. Connect the circuit - -Connect the +5V port on the Arduino board to one of the pins on the tilt switch (it doesn't matter which way round). -Connect the other pin to an empty digital input on the board. - -Code Club Miniband - -### 3. Program the Arduino - -Find the appropriate code from the respository and upload to your Ardunio board. +## Useful links: -### 4. Set up in Scratch - -Find a maraca / shaker sound and upload to Scratch. - - -## Connecting to the Raspberry Pi - -Set up your Raspberry Pi with a power supply and monitor. -Connect all your Ardunio boards (it's easiest to have one per instrument!) to the Raspberry Pi using USB. -You will probably need a USB hub. - - -## Python glueware - -Download the music-maker-hander.py file from the repository. Run it with - python music-maker-handler.py -This program sets up a listener for each instrument. When it detects that an instrument has been played, it sends a couple of signals to Scratch. - -The first signal appears in Scratch as a sensor value and is the volume (for drums), pitch (for the guitar), or ignored (for the maracas). - -The second signal is a broadcast message that makes Scratch play the sound in the instrument. - -One problem we had was with how the operating sytem mapped the various Arduinos to devices. It seemed to be pretty arbitrary. In the end, we tracked the device names by running - tail -f /var/log/syslog -in a separate terminal and watching what the devices were called when we plugged them in. We could then edit the various DEVICE parameters in to top of the Python script to fit. You could probably be cleverer by using some udev rules to fix the device names, but we didn't think of that (and didn't have enough time either). - -## Scratch front end - -The Scratch file, music-maker, makes the sounds. It responds to the signals from the Python handler above by playing the appropriate sounds. It also does some visual feedback for the insturments. - -Scratch on the Raspberry Pi is very slow, especially when it comes to updating the screen. Very often, Scratch would hang mid-way through a jamming session, only to start playing all the sounds after a short while. During the demos, people suggested that we minimise the Scratch window to reduce its workload. +* [Pictures from the hack day where this was put together](http://bit.ly/codeclubminiband) +* [Ardunio code](https://github.com/KatJoyWhite/miniband/tree/master/arduino) diff --git a/writeup/drums.jpg b/writeup/drums.jpg new file mode 100644 index 0000000..bc348de Binary files /dev/null and b/writeup/drums.jpg differ diff --git a/writeup/guitar.jpg b/writeup/guitar.jpg new file mode 100644 index 0000000..bd6e033 Binary files /dev/null and b/writeup/guitar.jpg differ diff --git a/writeup/maracas.jpg b/writeup/maracas.jpg new file mode 100644 index 0000000..63a8519 Binary files /dev/null and b/writeup/maracas.jpg differ diff --git a/writeup/miniband-judges.jpg b/writeup/miniband-judges.jpg new file mode 100644 index 0000000..9de201a Binary files /dev/null and b/writeup/miniband-judges.jpg differ diff --git a/writeup/miniband.doc b/writeup/miniband.doc index 96317bc..5c2ffaf 100644 Binary files a/writeup/miniband.doc and b/writeup/miniband.doc differ diff --git a/writeup/miniband.odt b/writeup/miniband.odt index 0341841..e64f818 100644 Binary files a/writeup/miniband.odt and b/writeup/miniband.odt differ diff --git a/writeup/miniband.pdf b/writeup/miniband.pdf index af1ce68..2d29241 100644 Binary files a/writeup/miniband.pdf and b/writeup/miniband.pdf differ