From 6f473e8dfb067f7d4c8620181f5dd0069134bc18 Mon Sep 17 00:00:00 2001 From: rkcf Date: Sun, 5 Feb 2023 15:48:40 -0600 Subject: [PATCH] Refactor: change around pin assignments and mapped out future peripherals --- README.org | 45 +++++++++++++++++++++++++++++++----------- main/esp32-sequencer.c | 22 ++++++++++----------- 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/README.org b/README.org index d39949e..7c4b674 100644 --- a/README.org +++ b/README.org @@ -52,20 +52,41 @@ idf.py -p $PORT flash monitor ** Pinout | ESP32 Pin | Function | Peripheral Pin | |-----------+---------------------+----------------| -| 5 | Clock LED | | -| 6 | Gate LED | | +| 1 | Clock LED | | +| 2 | Gate LED | | | 7 | Clock CV Out | | | 8 | Gate CV Out | | -| 9 | Mutate Button In | | -| 10 | Tap Tempo Button In | | -| | | | -| 36 | CS | LCD 3 | -| 37 | RESET | LCD 4 | -| 38 | DC/RS | LCD 5 | -| 39 | SDI/MOSI | LCD 6 | -| 40 | SCK | LCD 7 | -| 41 | LED | LCD 8 | -| 42 | SDO/MISO | LCD 9 | +| 17 | 1V/O CV Out | | +|-----------+---------------------+----------------| +| CV Inputs | | | +|-----------+---------------------+----------------| +| 19 | Clock CV In | | +| 20 | Mutate CV In | | +|-----------+---------------------+----------------| +| Controls | | | +|-----------+---------------------+----------------| +| 10 | Mutate Button In | | +| 11 | Tap Tempo Button In | | +| 12 | Rotary Encoder 1 | A1 | +| 13 | Rotary Encoder 1 | B1 | +| 14 | Rotary Encoder 2 | A1 | +| 15 | Rotary Encoder 2 | B1 | +| 33 | RE1 Red LED | 1 | +| 34 | RE1 Green LED | 2 | +| 35 | RE1 Blue LED | 4 | +| 36 | RE2 Red LED | 1 | +| 37 | RE2 Green LED | 2 | +| 38 | RE2 Blue LED | 4 | +|-----------+---------------------+----------------| +| LCD | | | +|-----------+---------------------+----------------| +| 39 | CS | LCD 3 | +| 40 | RESET | LCD 4 | +| 41 | DC/RS | LCD 5 | +| 42 | SDI/MOSI | LCD 6 | +| 4 | SCK | LCD 7 | +| 3 | LED | LCD 8 | +| 5 | SDO/MISO | LCD 9 | *** TFT LCD Screen | LCD Pin | ESP32 Pin | Function | diff --git a/main/esp32-sequencer.c b/main/esp32-sequencer.c index 93513bd..219577f 100644 --- a/main/esp32-sequencer.c +++ b/main/esp32-sequencer.c @@ -47,8 +47,8 @@ /* Inputs */ /* Controls */ -#define GPIO_MUTATE_BTN (9) /* Mutate Button In */ -#define GPIO_TAP_TEMPO_BTN (10) /* Tap Tempo Button In */ +#define GPIO_MUTATE_BTN (10) /* Mutate Button In */ +#define GPIO_TAP_TEMPO_BTN (11) /* Tap Tempo Button In */ static QueueHandle_t control_event_queue = NULL; @@ -57,20 +57,20 @@ static QueueHandle_t control_event_queue = NULL; #define GPIO_GATE_OUT (8) /* Gate CV Out */ /* LED GPIO Pins */ -#define LEDC_CLK_OUT (5) -#define LEDC_GATE_OUT (6) +#define LEDC_CLK_OUT (1) +#define LEDC_GATE_OUT (2) /* SPI LCD Config and Pins */ #define LCD_V_RES 240 #define LCD_H_RES 320 -#define LCD_SCLK_PIN 40 -#define LCD_MOSI_PIN 39 -#define LCD_MISO_PIN 42 -#define LCD_DC_PIN 38 -#define LCD_RST_PIN 37 -#define LCD_CS_PIN 36 -#define LCD_BK_LIGHT_PIN 41 +#define LCD_CS_PIN 39 +#define LCD_DC_PIN 41 +#define LCD_RST_PIN 40 +#define LCD_MOSI_PIN 42 +#define LCD_SCLK_PIN 4 +#define LCD_BK_LIGHT_PIN 3 +#define LCD_MISO_PIN 5 #define LVGL_TICK_MS 2