mirror of
https://github.com/erik-toth/audio-synth.git
synced 2026-04-27 02:04:58 +00:00
Firmware pin defintions mapped to pcb; checked 3d files, frontplates left/right ok (changes were made by me), housing supporting structure is mssing (middle), 3d file for connector part is missing
This commit is contained in:
@@ -14,11 +14,11 @@ Keyboard keyboard(N_KEYBOARD_ROW, N_KEYBOARD_COL, pins_keyboard_row, pins_keyboa
|
||||
Adafruit_MCP4728 MCP4728;
|
||||
MCP4728_channel_t cvMap[N_CV_GATES] = {MCP4728_CHANNEL_A, MCP4728_CHANNEL_B};
|
||||
uint16_t keyToVoltage[N_KEYBOARD_ROW*N_KEYBOARD_COL] = {
|
||||
1*83, 6*83, 11*83, 16*83, 21*83,
|
||||
2*83, 7*83, 12*83, 17*83, 22*83,
|
||||
3*83, 8*83, 13*83, 18*83, 23*83,
|
||||
4*83, 9*83, 14*83, 19*83, 24*83,
|
||||
5*83, 10*83, 15*83, 20*83, 25*83
|
||||
0*83, 1*83, 2*83, 3*83, 4*83,
|
||||
5*83, 6*83, 7*83, 8*83, 9*83,
|
||||
10*83, 11*83, 12*83, 13*83, 14*83,
|
||||
15*83, 16*83, 17*83, 18*83, 19*83,
|
||||
20*83, 21*83, 22*83, 23*83, 24*83
|
||||
};
|
||||
|
||||
CV cv(&MCP4728, &Wire, N_CV_GATES, cvMap, keyToVoltage, N_KEYBOARD_ROW, N_KEYBOARD_COL);
|
||||
@@ -48,7 +48,7 @@ static uint16_t last_voltage_ch2 = 0xFFFF;
|
||||
|
||||
bool readButton(byte pin, ButtonState &state)
|
||||
{
|
||||
bool reading = digitalRead(pin) == LOW;
|
||||
bool reading = digitalRead(pin) == HIGH;
|
||||
bool buttonPressed = false;
|
||||
|
||||
if(reading != state.last)
|
||||
@@ -74,11 +74,11 @@ bool readButton(byte pin, ButtonState &state)
|
||||
|
||||
void initButtons()
|
||||
{
|
||||
pinMode(PIN_SB_1_REC, INPUT_PULLUP);
|
||||
pinMode(PIN_SB_1_PLAY, INPUT_PULLUP);
|
||||
pinMode(PIN_SB_2_REC, INPUT_PULLUP);
|
||||
pinMode(PIN_SB_2_PLAY, INPUT_PULLUP);
|
||||
pinMode(PIN_B_METRONOME, INPUT_PULLUP);
|
||||
pinMode(PIN_SB_1_REC, INPUT_PULLDOWN);
|
||||
pinMode(PIN_SB_1_PLAY, INPUT_PULLDOWN);
|
||||
pinMode(PIN_SB_2_REC, INPUT_PULLDOWN);
|
||||
pinMode(PIN_SB_2_PLAY, INPUT_PULLDOWN);
|
||||
pinMode(PIN_B_METRONOME, INPUT_PULLDOWN);
|
||||
|
||||
btn_sb1_rec.current = false;
|
||||
btn_sb1_rec.last = false;
|
||||
|
||||
Reference in New Issue
Block a user