Hey folks,
I’m experimenting with two 4051 multiplexers using a Nano ESP32 S3 with the Control Surface library.
I would like to control one CC button with mux1 and one PBpotentiometer with mux2.
I can make one mux working with digital input (button) or analog input (potentiometer). Problem is that when I try to have both MUX's working at the same time, the button seems unresponsive.
I tried using pull-up resistors on the button but no luck.
#include <Encoder.h>
#include <Control_Surface.h>
USBMIDI_Interface midi;
using namespace MIDI_Notes;
CD74HC4051 mux1 {13, {3, 4, 11}};
CD74HC4051 mux2 {12, {3, 4, 11}};
//BUTTON
NoteButton button1 = {
mux1.pin(1),
{note(Ab, -1), CHANNEL_1}, // Note on MIDI channel
};
//FADER
PBPotentiometer vol1 {
mux2.pin(1), // Analog pin connected to potentiometer
CHANNEL_1, // MIDI Channel
};
void setup() {
RelativeCCSender::setMode(relativeCCmode::MACKIE_CONTROL_RELATIVE);
Control_Surface.begin();
}
void loop() {
Control_Surface.loop();
}
Thank you in advance.