Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« on: March 04, 2013, 03:48:15 pm » |
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: http://blog.georgmill.deif anyone can help then it would be really really appreciated. the code is: http://sourceforge.net/projects/yaamidrum/please if anyone can help me get a working schematic i would be eternally grateful. many thanks marc
|
|
|
|
|
Logged
|
|
|
|
|
Croatia
Offline
Full Member
Karma: 9
Posts: 243
|
 |
« Reply #1 on: March 04, 2013, 04:04:13 pm » |
Wouldn't that be obvious from the code?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #2 on: March 04, 2013, 04:32:47 pm » |
how so? this project uses the a Mux shield and that has a lot of inputs but as still new im not sure how to locate them.
any input??
thanks
marc
|
|
|
|
|
Logged
|
|
|
|
|
Croatia
Offline
Full Member
Karma: 9
Posts: 243
|
 |
« Reply #3 on: March 04, 2013, 04:52:37 pm » |
Just as a simple button needs a pin defined for an input, so does any other sensor. Look at the top of the code to find out which ones.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #4 on: March 04, 2013, 05:08:31 pm » |
but doesnt it differ with multiplexers???
|
|
|
|
|
Logged
|
|
|
|
|
Croatia
Offline
Full Member
Karma: 9
Posts: 243
|
 |
« Reply #5 on: March 05, 2013, 01:35:48 am » |
Then the code will tell you which pins the multiplexers are connected to.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #6 on: March 05, 2013, 03:38:45 pm » |
i still dont see how it does, i am still very new so please ignore my lack of knowledge, would you mind taking a look and seeing if you could help??
many thanks marc
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 27
Posts: 827
|
 |
« Reply #7 on: March 05, 2013, 04:55:27 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #9 on: March 05, 2013, 05:22:46 pm » |
so effectively i could just connect them all up and put them in ascending order???
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 27
Posts: 827
|
 |
« Reply #10 on: March 05, 2013, 05:59:30 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #11 on: March 06, 2013, 05:14:58 pm » |
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 ???
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 27
Posts: 827
|
 |
« Reply #12 on: March 06, 2013, 06:57:22 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #13 on: March 06, 2013, 07:01:39 pm » |
any idea what the A0 is being used for from looking at the code??
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 27
Posts: 827
|
 |
« Reply #14 on: March 06, 2013, 07:20:18 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
|