Hi everyone, I recently bought a teensy 4.1. I'm building a controller with 11 multiplexers, In the past I had already done such a project and with the help of the forum I managed to make everything work, I went from a thousand wires to pcb panels.
The code of the previous controller doesn't work anymore with the new project.
The problem is that the potentiometers work partially, the direction of rotation inside the daw is wrong (from right to left) also does not make a complete rotation but stops halfway.
I tried to make an analog read, but it doesn't work, the reading remains always on the same number even if I turn the potentiometer.
I also tried with another teensy 4.1 and potentiometer same problem,
I do not know how to go on
Can you help me please
Thanks in advance
Translated with www.DeepL.com/Translator (free version)
this is the code :
#include <Control_Surface.h> // Include the library
USBMIDI_Interface midi; // Instantiate a MIDI Interface to use
// Install an analog multiplexer
CD74HC4067 mux {
A0, // Analog input pin
{2, 3, 4, 5} // Address pins S0, S1, S2
};
CCPotentiometer volumePotentiometers[] {
{ mux.pin(0), { MIDI_CC::Channel_Volume, CHANNEL_1 } }
{ mux.pin(1), { MIDI_CC::Channel_Volume, CHANNEL_2 } }
{ mux.pin(2), { MIDI_CC::Channel_Volume, CHANNEL_3 } }
{ mux.pin(3), { MIDI_CC::Channel_Volume, CHANNEL_4 } }
{ mux.pin(4), { MIDI_CC::Channel_Volume, CHANNEL_5 } }
{ mux.pin(5), { MIDI_CC::Channel_Volume, CHANNEL_6 } }
{ mux.pin(6), { MIDI_CC::Channel_Volume, CHANNEL_7 } }
{ mux.pin(7), { MIDI_CC::Channel_Volume, CHANNEL_8 }
};
void setup() {
Control_Surface.begin(); // Initialize the Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}