PCB complete

This commit is contained in:
2026-01-27 09:07:04 +01:00
parent 6b5ad3edce
commit cf8347a1a6
20 changed files with 369 additions and 12 deletions

View File

@@ -12,8 +12,8 @@
#include <Arduino.h>
#include <Wire.h>
// CONSTANTS DEFINITONS
#define N_KEYBOARD_ROW 4 // for PROD. change to 5
#define N_KEYBOARD_COL 3 // for PROD. change to 5
#define N_KEYBOARD_ROW 5 // for PROD. change to 5
#define N_KEYBOARD_COL 5 // for PROD. change to 5
#define N_CV_GATES 2 // PROD. OK
#define N_SB 2 // PROD. OK
#define BAUDRATE 115200
@@ -34,13 +34,13 @@
#define PIN_K_C3 5 // DEV. not in use - PROD. pin OK
#define PIN_K_C4 6 // DEV. not in use - PROD. pin OK
// SEQUENCER BUTTON PINS
#define PIN_SB_1_REC 38 // for PROD. change to 33 / not available on dev board
#define PIN_SB_1_PLAY 37 // for PROD. change to 34 / not available on dev board
#define PIN_SB_1_REC 33 // for PROD. change to 33 / not available on dev board
#define PIN_SB_1_PLAY 34 // for PROD. change to 34 / not available on dev board
#define PIN_SB_2_REC 35 // 35
#define PIN_SB_2_PLAY 36 // 36
// MISC/INFO PINS
#define PIN_VCO1_EN 41 // PROD. pin 37 TODO: if there is an active key mapped to CV-Gate 1 --> HIGH
#define PIN_VCO2_EN 40 // PROD. pin 38 TODO: if there is an active key mapped to CV-Gate 2 --> HIGH
#define PIN_VCO1_EN 37 // PROD. pin 37 TODO: if there is an active key mapped to CV-Gate 1 --> HIGH
#define PIN_VCO2_EN 38 // PROD. pin 38 TODO: if there is an active key mapped to CV-Gate 2 --> HIGH
#define PIN_REC 39 // PROD. pin 39 TODO: if any sb is recording LED on (active-low)
#define PIN_BPM 12 // PROD. pin 12 TODO: get bpm through potentiometer analog value -> ADC-Pin
#define PIN_B_METRONOME 13 // PROD. pin 13 TODO: button activates/deactivates bpm led output (pull-up)

View File

@@ -6,18 +6,19 @@
#include "FIRMWARE_DEF.h"
#include "FIRMWARE.h"
byte pins_keyboard_row[N_KEYBOARD_ROW] = {PIN_K_R0, PIN_K_R1, PIN_K_R2, PIN_K_R3};
byte pins_keyboard_col[N_KEYBOARD_COL] = {PIN_K_C0, PIN_K_C1, PIN_K_C2};
byte pins_keyboard_row[N_KEYBOARD_ROW] = {PIN_K_R0, PIN_K_R1, PIN_K_R2, PIN_K_R3, PIN_K_R4};
byte pins_keyboard_col[N_KEYBOARD_COL] = {PIN_K_C0, PIN_K_C1, PIN_K_C2, PIN_K_C3, PIN_K_C4};
Keyboard keyboard(N_KEYBOARD_ROW, N_KEYBOARD_COL, pins_keyboard_row, pins_keyboard_col);
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, 5*83, 9*83,
2*83, 6*83, 10*83,
3*83, 7*83, 11*83,
4*83, 8*83, 12*83
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
};
CV cv(&MCP4728, &Wire, N_CV_GATES, cvMap, keyToVoltage, N_KEYBOARD_ROW, N_KEYBOARD_COL);
@@ -376,6 +377,7 @@ void loop()
Key k1 = keyboard.getQueue(0);
if(!isNotKey(k1))
{
Serial.printf("\n\r[DEBUG] K1: R%iC%i", k1.row, k1.col);
voltage_ch1 = keyToVoltage[k1.row * N_KEYBOARD_COL + k1.col];
cv1_active = true;
}
@@ -386,6 +388,7 @@ void loop()
Key k2 = keyboard.getQueue(1);
if(!isNotKey(k2))
{
Serial.printf("\n\r[DEBUG] K2: R%iC%i", k2.row, k2.col);
voltage_ch2 = keyToVoltage[k2.row * N_KEYBOARD_COL + k2.col];
cv2_active = true;
}