Hello everyone,
I'm playing a little bit the ESP32 3S Nano board from Waveshare.
I'm trying to control some potentiometers and encoders with the mighty control surface library.
I say "I'm trying" because I'm unable to make it work.
I followed the instructions found on the Waveshare website for uploading the sketch, which actually doesn't work because they don't mention that the ESP32 needs to go on BOOT mode by shorten pin B1 with GND and pressing RST button.
Anyway, I included in the sketch a simple blinking line in the loop, just to make sure that the program runs.
After uploading the sketch and resetting the unit, the internal LED blinks but the module doesn't get recognised as a control surface by MIDI Monitor.
#include <Control_Surface.h>
USBMIDI_Interface midi;
//POTS-----------------------
PBPotentiometer vol7{
14, // Analog pin connected to potentiometer 14
CHANNEL_3, // MIDI Channel
};
PBPotentiometer vol8{
13, // Analog pin connected to potentiometer 13
CHANNEL_4, // MIDI Channel
};
PBPotentiometer vol9{
12, // Analog pin connected to potentiometer 12
CHANNEL_5, // MIDI Channel
};
PBPotentiometer vol10{
11, // Analog pin connected to potentiometer 11
CHANNEL_6, // MIDI Channel
};
PBPotentiometer vol11{
4, // Analog pin connected to potentiometer. 4
CHANNEL_7, // MIDI Channel
};
PBPotentiometer vol12{
3, // Analog pin connected to potentiometer 3
CHANNEL_8, // MIDI Channel
};
// CCRotaryEncoders----------------------
CCRotaryEncoder enc7 = {
{ 44, 43 }, // pins
MCU::V_POT_3, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc8 = {
{ 38, 47 }, // pins
MCU::V_POT_4, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc9 = {
{ 18, 21 }, // pins
MCU::V_POT_5, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc10 = {
{ 10, 17 }, // pins
MCU::V_POT_6, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc11 = {
{ 8, 9 }, // pins
MCU::V_POT_7, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc12 = {
{ 6, 7 }, // pins
MCU::V_POT_8, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
void setup() {
Control_Surface.begin();
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
Control_Surface.loop();
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000);
}
I tried to change the basic options on IDE - Tools (see screenshot):
FAT and SPIFFS partitions don't seem to make any change
GPIO or Arduino pin numbering could make the difference I guess, but if I set it to Arduino the program doesn't get compiled.
I'm puzzled, can anybody help me?
Much obliged