update! changed this topic to a build log.
i purchased two of those IBM PCjr joysticks on ebay for $20. the mechanism is entirely plastic, not sure how durable they will be in the long run…
i wired up one pot to GND, 3.3v and the A0 pin on my teensy 3.1
loaded up the arduino sketch provided by @tehn on the Four-N controller topic.
const int ports[] = {A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16,A17,A18,A19,A20};
int v[2][21];
int last;
void setup() {
}
void loop() {
for(int i=0;i<21;i++) {
last = v[0][i];
v[0][i] = (analogRead(ports[i]) / 4 + v[1][i]) / 2;
if(v[0][i] != last)
usbMIDI.sendControlChange(i, v[0][i] / 2, 1);
v[1][i] = v[0][i];
}
delay(4);
}
i’m getting jitter and constant cc values even when i don’t adjust the pot.
can anyone advise me on which values to tinker with?