Replies: 2 comments
-
Use the
Why not just connect these pins to ground?
This could indicate that the wiring of the encoder is incorrect. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Please tell me how to edit the sketch to transmit CC81 (127 - 0) when the encoder rotates clockwise and transmit CC82 (127 - 0) when the encoder rotates counterclockwise? Now the encoder transmits CC81 (127) when the handle is rotated in both directions.
`#include <Control_Surface.h>
#define buttonPin 20
#define buttonGndPin 18
#define encoderAPin 5
#define encoderGndPin 4
#define encoderBPin 3
#define encoderSpeed 1
USBMIDI_Interface midi;
CCButton button {
buttonPin,
{MIDI_CC::General_Purpose_Controller_5, CHANNEL_1},
};
CCRotaryEncoder enc {
{encoderAPin, encoderBPin},
{MIDI_CC::General_Purpose_Controller_6, CHANNEL_1},
encoderSpeed,
};
void setup() {
pinMode(buttonGndPin, OUTPUT);
digitalWrite(buttonGndPin, LOW);
pinMode(encoderGndPin, OUTPUT);
digitalWrite(encoderGndPin, LOW);
Control_Surface.begin();
}
void loop() {
Control_Surface.loop();
}`
Beta Was this translation helpful? Give feedback.
All reactions