i have seen this project and would like to make it as well. however, i am new to arduino and cant seem to tell what pins to connect my piezos too neither the sensor for the hi hat pedal.
here is the project:
if anyone can help then it would be really really appreciated.
the code is:
please if anyone can help me get a working schematic i would be eternally grateful.
It doesn't really matter what inputs you connect them to. The code just scans all of them anyway. You connect the channels to instruments in your MIDI software on the computer.
A piezo generates electricity when pressure is applied to it, so you would connect one end to gnd on the shield and the other end into an input.
I can't promise that would work, because normally you would want a preamp on a piezo to condition the signal (the voltage output is likely in microvolts), but he didn't give any indication in his project that he was doing that.
However you want. You map them in your midi software. Ascending order makes sense so that you can know what channel is what when you set up the software.
so effectively the MUX shield is just looking for any kind of input voltage from the piezo and connecting them to any of the pins means that they would get read ???
Yes. The code you linked to just scans all of the multiplexed channels and dumps them all to the computer as MIDI channel data. So, in your MIDI software you map the channels that you have populated to instruments. It looks like it reads 48 inputs on the mux shield and 4 from the rest of the analog input pins (A1-A5.) So 52 MIDI channels are sent.
To keep things logical, start with channel 1 when you hook them up so you know which channels are connected when you go to map them.
A0 is the analog pin that all those 48 pins on the muxshield are being sent to. So, the mux shield works by addressing a channel (one of the 48 inputs.) This connects that input to A0.
cool i think i get it now on that sense, one last question, any ideas on the connection of the infared sensor or is that done in ht e same way just read as another analogue input from any of the MUX shields inputs???