Adding 2nd Potentiometer in Control-Surface

I am making a MIDI controller with a Leonardo card and have got one 10k pot to work in Control-Surface and need help please to add a second pot to pin A1:

#include <Control_Surface.h>

USBMIDI_Interface midi;

CCPotentiometer pot { A0, 10};

void setup() { Control_Surface.begin(); }
void loop() { Control_Surface.loop(); }
#include <Control_Surface.h>

USBMIDI_Interface midi;

CCPotentiometer pot1 { A0, 10};
CCPotentiometer pot2 { A1, 9};

void setup() { Control_Surface.begin(); }
void loop() { Control_Surface.loop(); }
1 Like

Great, it worked! Thanks very much.

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