Im trying to get messages from Traktor in my bluepill, but when i send a message in the software, my function is never called
Im using the exemple that comes with the library, but with the onboard led:
Code: Select all
#include <USBComposite.h>
class myMidi : public USBMIDI {
virtual void handleNoteOff(unsigned int channel, unsigned int note, unsigned int velocity) {
digitalWrite(PC13, LOW);
}
virtual void handleNoteOn(unsigned int channel, unsigned int note, unsigned int velocity) {
digitalWrite(PC13, LOW);
}
};
myMidi midi;
USBCompositeSerial CompositeSerial;
void setup() {
USBComposite.setProductId(0x0030);
midi.registerComponent();
CompositeSerial.registerComponent();
USBComposite.begin();
pinMode(PC13, OUTPUT);
digitalWrite(PC13, HIGH);
}
void loop() {
midi.poll();
}
Im doing something wrong in the code? There is another type of function that can work?
* i have tested the functions 'handleSysExData' and 'handleSysExEnd' too but same result