so I am currently creating a MIDI to CV module and am still having trouble with my MIDI input circuit. I am following this circuit as my guideline and am sending MIDI messages via MIDI interface with the use of this cable. I am also using this software called MIDIKeys as a virtual keyboard for the MIDI notes. Unfortunately, every time I play a note on the keyboard the Arduino doesn't respond with the blink of the LED. I could really use some guidance on fixing this problem.
Below is also the code that I'm using:
#include <MIDI.h> // Add Midi Library
#define LED 13 // Arduino Board LED is on Pin 13
//Create an instance of the library with default name, serial port and settings
//MIDI_CREATE_DEFAULT_INSTANCE();
MIDI_CREATE_DEFAULT_INSTANCE();
void setup() {
pinMode (LED, OUTPUT); // Set Arduino board pin 13 to output
MIDI.begin(MIDI_CHANNEL_OMNI); // Initialize the Midi Library.
MIDI.turnThruOff();
MIDI.setHandleNoteOn(MyHandleNoteOn);
MIDI.setHandleNoteOff(MyHandleNoteOff);
Serial.begin(31250);
}
void loop() { // Main loop
MIDI.read(); // Continuously check if Midi data has been received.
}
void MyHandleNoteOn(byte channel, byte pitch, byte velocity) {
digitalWrite(LED,HIGH); //Turn LED on
}
void MyHandleNoteOff(byte channel, byte pitch, byte velocity) {
digitalWrite(LED,LOW); //Turn LED off
}
Edit: To verify that my laptop is sending a MIDI message I am using this MIDI Monitor