Rotary Encoder Python code snippet, to use a rotary encoder with a Raspberry Pi by connecting it to the GPIO pins. Connections: GND -> GND VCC -> 3V3 Out A -> GPIO11 Out B -> GPIO12 Switch -> GPIO13