
12 WAY
STD12 WAY
License
:Description
PCB to be mounted on a 12-way single pole rotary switch, to make it work like a stepped voltage divider. Connected to an MCU analog pin, you can read out different values depending on switch position.
It is designed in a way that you will have room for the wires between the PCB and the switch, meaning it will not add any volume to the original switch size.
It is designed for the following switch: https://no.mouser.com/ProductDetail/611-A10005RNCQ
Example sketch (using arduino IDE and joystick library):
#include Joystick.h
#define rotPin A1
void setup () {
pinMode (rotPin, input);
Joystick.begin();
}
void loop() {
uint16_t rot = analogRead(rotPin);
rot = map (rot, 0, 1015, 0, 11);
for (int i = 0; i < 12, i++) {
if (i != rot) {
Joystick.releaseButton(i);
}
}
Joystick.pressButton(rot);
}
Design Drawing

BOM


Project Members

Comment