Well after many hrs have return to the forum so some clever person can tell me what I've done wrong.
The Led does not flash whne a midi signal is rx'ed.
The sketch is[code#include "Midi.h"
#include "NewSoftSerial.h"
NewSoftSerial mySerial(10, 11);
class MyMidi : public Midi {
public:
MyMidi(HardwareSerial &mySerial) : Midi(mySerial) {}
void handleNoteOn(unsigned int channel, unsigned int note, unsigned int velocity)
{
digitalWrite(13, HIGH);
}
void handleNoteOff(unsigned int channel, unsigned int note, unsigned int velocity)
{
digitalWrite(13, LOW);
}
};
// Create an instance of the MyMidi class.
MyMidi midi(Serial);
void setup()
{
pinMode(13, OUTPUT);
mySerial.begin(31250);
midi.begin(0);
}
void loop()
{
midi.poll();
}
]