Hello,
I'm still struggling with my project.
I finally got my relays set up right and when I test them with the LED on pin 13 they all work fine.
BUT when I connect my board to ardrumo I can't figure out the code I need the get them sorted.
The relays work as push buttons so I need to get rid of all the piezo information.
This is the code for the ardrumo when using piezo's
/*
* Ardrumo sketch
*
* Use with the Ardrumo software here:
*
http://code.google.com/p/ardrumo/ * This is designed to let an Arduino act as a drum machine
* in GarageBand (sorry, Mac OS X only).
*/
#define LEDPIN 13 // status LED pin
#define PIEZOTHRESHOLD 5 // analog threshold for piezo sensing
#define PADNUM 6 // number of pads
int val;
void setup() {
pinMode(LEDPIN, OUTPUT);
Serial.begin(57600); // set serial output rate
}
void loop() {
// Loop through each piezo and send data
// on the serial output if the force exceeds
// the piezo threshold
for(int i = 0; i < PADNUM; i++) {
val = analogRead(i);
if( val >= PIEZOTHRESHOLD ) {
digitalWrite(LEDPIN,HIGH); // indicate we're sending MIDI data
Serial.print(i);
Serial.print(",");
Serial.print(val);
Serial.println();
digitalWrite(LEDPIN,LOW);
}
}
}
Is there anybody that is able to adjust the ardumo code that I need to upload to use my switches instead of the piezo's?
I have got resistors between my relays so there is no need in using the internal pull up.
thank you very very much
Joey