Hi,
I am trying to bring my T4_1 to send out MIDI messages via USB. I have the following statement at the begining of my code:
(I picked it from an example I found on the net)
But this is giving me a compiler error (on PlatformIO):
It looks to me like the 'SerialUSB' is not matching the 'HardwareSerial' type.
What should I use instead?
I am trying to bring my T4_1 to send out MIDI messages via USB. I have the following statement at the begining of my code:
Code:
MIDI_CREATE_INSTANCE(HardwareSerial, SerialUSB, midiB);
But this is giving me a compiler error (on PlatformIO):
Code:
In file included from C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/MIDI.h:35:0,
from src\main.cpp:9:
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:102:61: error: no matching function for call to 'midi::SerialMIDI<HardwareSerial>::SerialMIDI(usb_seremu_class&)'
MIDI_NAMESPACE::SerialMIDI<Type> serial##Name(SerialPort);\
^
src\main.cpp:11:1: note: in expansion of macro 'MIDI_CREATE_INSTANCE'
MIDI_CREATE_INSTANCE(HardwareSerial, SerialUSB, midiB);
^
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:48:2: note: candidate: midi::SerialMIDI<SerialPort, _Settings>::SerialMIDI(SerialPort&) [with SerialPort = HardwareSerial; _Settings = midi::DefaultSerialSettings]
SerialMIDI(SerialPort& inSerial)
^
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:48:2: note: no known conversion for argument 1 from 'usb_seremu_class' to 'HardwareSerial&'
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:43:7: note: candidate: constexpr midi::SerialMIDI<HardwareSerial>::SerialMIDI(const midi::SerialMIDI<HardwareSerial>&)
class SerialMIDI
^
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:43:7: note: no known conversion for argument 1 from 'usb_seremu_class' to 'const midi::SerialMIDI<HardwareSerial>&'
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:43:7: note: candidate: constexpr midi::SerialMIDI<HardwareSerial>::SerialMIDI(midi::SerialMIDI<HardwareSerial>&&)
C:\Users\Micha\.platformio\packages\framework-arduinoteensy\libraries\MIDI\src/serialMIDI.h:43:7: note: no known conversion for argument 1 from 'usb_seremu_class' to 'midi::SerialMIDI<HardwareSerial>&&'
*** [.pio\build\teensy41\src\main.cpp.o] Error 1
What should I use instead?