MIDIUSB + HC06 + Leonardo - Help

Hi, im trying to use the MIDIUSB library, on Arduino Leonardo with Bluetooth HC06, wich is connected on 0,1 pins.

If I use with Arduino UNO, it works fine, but with Leonardo it isn't work.

There are some special configuration that I need to do on Leonardo?

You have to use Serial1 instead of Serial. Serial on the Leonardo is USB CDC Serial, Serial1 is the UART on pins 0 and 1.

Pieter

PieterP:
You have to use Serial1 instead of Serial. Serial on the Leonardo is USB CDC Serial, Serial1 is the UART on pins 0 and 1.

Pieter

Ok, but where can I change to Serial1? MIDIUSB.h is different from MIDI.h. On MIDI.h we can change the hardwareserial (MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI):wink: but with MIDIUSB.h i didn't find it

MIDIUSB has nothing to do with Serial, it uses the USB connection.

Serial1 is for your Bluetooth module.

OK, I understood.

Tks