Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions variants/esp32_s3_crowpanel_2_1/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,37 @@
#define Pins_Arduino_h

#include <stdint.h>
#include "hal/gpio_types.h"

#define ESP32_S3_CROWPANEL_2_1

static const uint8_t SDA = 38;
static const uint8_t SCL = 39;
static const gpio_num_t SDA = GPIO_NUM_38;
static const gpio_num_t SCL = GPIO_NUM_39;

static const uint8_t SCK = 2;
static const uint8_t SS = 16;
static const uint8_t MOSI = 0; // not used, but defined for compatibility with libraries that use SPI.h
static const uint8_t MISO = 0; // not used, but defined for compatibility with libraries that use SPI.h
static const gpio_num_t SCK = GPIO_NUM_2;
static const gpio_num_t SS = GPIO_NUM_16; // CS
static const gpio_num_t MOSI = GPIO_NUM_0; // not used, but defined for compatibility with libraries that use SPI.h
static const gpio_num_t MISO = GPIO_NUM_0; // not used, but defined for compatibility with libraries that use SPI.h

static const uint8_t ENCODER_A_PIN = 42;
static const uint8_t ENCODER_B_PIN = 4;
static const gpio_num_t ENCODER_CLK_PIN = GPIO_NUM_42; // CLK to detect CW if same value or CCW if different value (ENCODER_A_PIN)
static const gpio_num_t ENCODER_DT_PIN = GPIO_NUM_4; // interrupt trigger (ENCODER_B_PIN)

static const uint8_t BREATH_LED_PIN = 43;

static const uint8_t RX = 50;
static const uint8_t TX = 49;

static const uint8_t BACKLIGHT_LED_PIN = 6;
static const gpio_num_t RX = GPIO_NUM_44;
static const gpio_num_t TX = GPIO_NUM_43;

// PCF8574 Extended IO
static const uint8_t I2C_IO_EXPANDER_ADDRESS = 0x21; // pcf8574
static const uint8_t I2C_TOUCH_ADDR = 0x15; // often but not always 0x15!
static const uint8_t TOUCHSCREEN_RESET_PIN = 0;
static const uint8_t TOUCHSCREEN_INTERRUPT_PIN = 2;
static const uint8_t LCD_POWER_PIN = 3;
static const uint8_t LCD_RESET_PIN = 4;
static const uint8_t ENCODER_BUTTON_PIN = 5;

#endif /* Pins_Arduino_h */
static const uint8_t I2C_TOUCH_ADDRESS = 0x15; // often but not always 0x15!
static const uint8_t I2C_SCREEN_ADDRESS = 0x3C;
static const gpio_num_t TOUCHSCREEN_RESET_PIN = GPIO_NUM_0;
static const gpio_num_t TOUCHSCREEN_INTERRUPT_PIN = GPIO_NUM_2;
static const gpio_num_t LCD_POWER_PIN = GPIO_NUM_3;
static const gpio_num_t LCD_RESET_PIN = GPIO_NUM_4;
static const gpio_num_t ENCODER_BUTTON_PIN = GPIO_NUM_5;

// Screen
static const uint16_t SCREEN_HEIGHT = 480;
static const uint16_t SCREEN_WIDTH = 480;
static const gpio_num_t SCREEN_BACKLIGHT_PIN = GPIO_NUM_6;

#endif
Loading