Control Surface with Arduino Nano 33 BLE: Not Working

Hello,
I just bought a Nano 33 BLE hoping it would be easier to make it work than the ESP32 (which is driving me mad).

However, I can't make it work either.
Nano 33 BLE seems listed in the control surface compatibility chart

I'm uploading a basic test sketch but no luck:


#include <Control_Surface.h>

USBMIDI_Interface midi;

using namespace MIDI_Notes;


//setup LED pin
const byte ledPin = LEDB;
byte On = LOW;



//POTS-----------------------
PBPotentiometer vol1{
  A1,         // Analog pin connected to potentiometer 14
  CHANNEL_1,  // MIDI Channel
};



// CCRotaryEncoders----------------------
CCRotaryEncoder enc1 = {
  { D1, D0 },    // pins
  MCU::V_POT_1,  // MIDI address (CC number + optional channel)
  1,             // optional multiplier if the control isn't fast enough

};

void setup() {


  Control_Surface.begin();

  pinMode(ledPin, OUTPUT);
};

void loop() {

  Control_Surface.loop();

  digitalWrite(ledPin, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                 // wait for a second
  digitalWrite(ledPin, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);
}

MidiMonitor can't detect anything.
Can anybody help me?

Thank you

Wow, of all the boards on the market you just happened to pick the only two that don't work for you. How unlucky.
I have no idea if your code is right, post the verbose output of the verify set to errors ALL.

Don't use delay, it blocks the execution of your entire program.
After removing the delays from the code you posted, it works fine for me.

Hello @PieterP, thanks for your quick reply.

I got rid of the delays and I tried the very basic sketch below:

#include <Control_Surface.h>

USBMIDI_Interface midi;

using namespace MIDI_Notes;

void setup() {Control_Surface.begin();};

void loop() {

Control_Surface.loop();

static AH::Timer<millis> ping_timer{ 1000 };
  if (ping_timer)
      midi.sendNoteOn(C[0], 127);
}

Now it works only if I swap USB port after I uploaded the sketch (it cannot be the same USB port). Still not ideal, but it works, thanks for helping out!