Control Surface Library - MCU Question

To use extended inout/output pins (like shift registers), you have to add using namespace ExtIO; after including Control Surface. See Control Surface: 1.SPI-Blink.ino for an example.

I may one day refactor the code to use ADL to make this redundant, but it's not very high up on my to do list.

No, you already specified this by passing SPI to the shift register constructor, this determines the pins.

Thanks, it's working! Now I have to increase to 16 buttons and LEDs...

Migrating control surface design from Leonardo to Teensy 4.1. Saw that this thread was using Teensy at one point, so thought someone here may know answer:

With code that runs well on Leonardo, when I try compiling on Teensy, I'm getting the compile error - USBMIDI_Interface usbmidi; "does not name a type."

Debug is working: USBDebugMIDI_Interface midi = 115200;
But not USBMIDI_Interface midi = 115200; or USBMIDI_Interface midi;

Is there perhaps another midi initialization line missing here?

From this thread, I've also tried:

SerialMIDI_Interface<decltype(Serial)> midi {Serial, 115200};
HardwareSerialMIDI_Interface serialmidi = Serial1;

Which will compile, but nothing showing up on midi monitor, and teensy isn't automatically showing up in DAW as option of midi controller like the Leonardo does.

Resolved! - Just needed to select 'MIDI' from the Arduino IDE menu: Tools > USB Type

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.