can't get this to work... I'm using the standard opto-isolator circuit which I've gotten to work with PICs previously.
my program right now is pretty simple, just lights up an LED if a noteOn message is detected...
void light();
void setup() {
beginSerial(31250);
pinMode(13, OUTPUT);
}
void loop() {
if(serialRead() == 144) {
light(13);
}
}
void light(pinNum) {
digitalWrite(pinNum, HIGH);
delay(1000);
digitalWrite(pinNum, LOW);
delay(1000);
}
In terms of error checking:
- I know my MIDI device is transmitting on the correct channel
- There is output from my opto-isolator
- My LED is plugged in the right way
One question I had was about the serial connection... I have a USB board. In order to receive MIDI I am using the following hookup order.
- Upload the program with the MIDI output disconnected from the serial header.
- Unplug the USB connection (external power is plugged in)
- Plug the MIDI output into the serial receive header
- Reset Arduino
- Test program (unsuccessfully).
Does this seem like the correct sequence?
Thanks for any help. I'm really enjoying using the board so far. - Charlie