Working on the new Odroid-C1+ becomes more and more interesting. Having compiled the realtime kernel sources successfully on the C1+ I got the graped midi piano running together with the HiFi-Shield from hardkernel.com. You can plug the shield into your HiFi station at home or plug in your favorite headphones. Here I just use it together with simple bluetooth speaker which is connected with a stereo cable to the HiFi-Shield (which is a real waste of resources, I know. I just want to get a mobile HiFi Midi Graped Piano).
The graped piano can be connected with up to 48 grapes, but to keep the amount of wires low there is only a demonstration with 4 grapes (I’m not so hungry today).
To get the best conditions for my grapes I plugged a mini weather station (BME280) additionally on the breadboard. So, if it’s too hot, you can ask somebody to cool the location. Than your grapes will be fresh for a long, long time.
As third gimmick I plugged my touch(less) sensitive TouchDuino into the C1+ and can generate sounds with it by touching a DIY touchless sensor made from an old CD-cover and some aluminium foil.
this is a video for a tutorial on Libre Music Production. It explains how to create a simple to build, easy to use and really cheap Midi input device with an Arduino Uno.
my article about the little Midi piano with a bunch of grapes made it into the august 2015 edition (page 26: FRUIT MIDI) of the official ODROID MAGAZINE. Next week I’ll publish the python sources to get it running quick and easy.
Thanks to all the guys of the ODROID MAGAZINE (esp. Rob Roy, Chief Editor of the Odroid Magazine) and Hardkernel.com for the excellent hardware.
Here is a modification of the first version of my TouchDuinoX(tended): The TouchDuino XL
You can download the sketch from here. To get it running you have to download and install the Centipede Shield library. You do not need the shield itself necessarily, but it make things easier if you don’t want to wire it up manually with 4xMCP23017.
The sketch does not include the code for the analog multiplexer/demultiplexer shield as it makes things too complicated. This is about touch sensing, so we’ll keep it as simple as possible.
The 3 x CD74hc4067’s come as an ready to use Arduino Shield produced by mayhewlabs.com (http://mayhewlabs.com/products/arduino-mux-shield). My version is an older version. A newer shield is available which is from 2013.
We used the old version because it was part of my old YAAMIDrum project from 2012. So dust was removed from the shield and reactivated to become a part of the new TouchDuino XL.
The special thing about the digital inputs is the fact that they are used to trigger not only bit values (on/off) but they return values from 0-127 that can be used to do several things. E.g. you can use these values to change the volume of a midi tone. Or you can use it to pitchbend the sound. There are a lot of possibilities. How is this done? We modificated the arduino sketch that can be found on http://playground.arduino.cc/Code/CapacitiveSensor so that it runs on the MCP23017. Fortunately there is a great library (http://macetech.com/Centipede.zip) available from http://docs.macetech.com/doku.php/centipede_shield where you can buy a ready to use arduino shield to get hings running very quickly. For german users there is a worth to read discussion in the arduino forums (http://forum.arduino.cc/index.php?topic=170396.0)
We used this library to avoid writing things twice. You can find example code on their website that shows how to use this excellent lib.
Here is described how one of the 4 chips is connected on the breadboard
You need to make your fingers wet (with water or best and cheapest with your own saliva). Then put one wire to ground and hold it in one hand. With a wet finger of your other hand touch a paperclip and you can read the measured value from 0-127 on the serial monitor of the Arduino IDE. Set the DEBUG value in the sketch to 1 for debugging and printing these values out to serial line.
Conclusion:
The problem is the internal pullup resistor of the MCP23017. It has 100 kilo ohm, whereas the internall pullup resistors of the arduino are 20 kilo ohm only. So the solution is really simple, but dangerous:
Turn off the internal pullups of the MCP23017, map the values the other way round and you are done. The disadvantage: If you ever connect any active sensor to on of the inputs/paper clips the possibility that you damage the IC or the Arduino is more than high. Be careful.
But now you simply can touch the paper clips to produce midi sounds 🙂