W5ZZO
Well-known member
I have a (partially) half-baked idea to make some sort of YASS (Yet Another Silly Synthesizer). I salvaged some matrix musical keypads and reverse engineered their layout.
They are the expected diode matrix, with two contacts per note for velocity calculation. At this time there is no multiplexing, each column and row has their own Teensy data pin.
In the partial code below, without the delay(1) inserted I get all 0 readings from the digitalRead() calls. It appears that the time needed for the voltage to propagate through the diode is more than the time needed to perform the function call. This will make each scan unacceptably long, as it adds 48ms total.
Does anyone have an idea for a better speedbump or approach to reading these keys?
- Wes
They are the expected diode matrix, with two contacts per note for velocity calculation. At this time there is no multiplexing, each column and row has their own Teensy data pin.
In the partial code below, without the delay(1) inserted I get all 0 readings from the digitalRead() calls. It appears that the time needed for the voltage to propagate through the diode is more than the time needed to perform the function call. This will make each scan unacceptably long, as it adds 48ms total.
Does anyone have an idea for a better speedbump or approach to reading these keys?
Code:
// perform keys scan
for(int i=0; i<NUMCOLS; i++) {
for(int j=0; j<NUMROWS; j++) {
pinMode(kCols[i], INPUT_PULLUP);
delay(1);
noteMap[i][j]=digitalRead(kRows[j]);
pinMode(kCols[i], INPUT_PULLDOWN);
}
- Wes