diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5c5735c..411655e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,6 @@ { - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format "recommendations": [ + "Jason2866.esp-decoder", "pioarduino.pioarduino-ide", "platformio.platformio-ide" ], diff --git a/README.md b/README.md index 642f08d..c4aa16c 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ You can use these links to buy a developer board. If you want to support this pr - [LilyGo](https://lilygo.cc/) [T3-S3](https://s.click.aliexpress.com/e/_c3o28ou9)* LoRa 2.4 GHz - [Waveshare](https://www.waveshare.com/) [ESP32-S3 GEEK](https://s.click.aliexpress.com/e/_c35mBhkF)* - [Waveshare](https://www.waveshare.com/) [ESP32-S3 AMOLED 2.06](https://s.click.aliexpress.com/e/_c34ka7n1)* Watch with 16 MB flash, AMOLED touch display, Wi-Fi 5, BT 5 LE, accelerometer, gyroscope + - [Elecrow](https://www.elecrow.com/) [CrowPanel 2.1 inch HMI](https://s.click.aliexpress.com/e/_c4LjYad5)* Rotary Display 480*480 IPS Round Touch Knob Screen - ESP32 C6 single core with WiFi 6 and BT-5 LE - [NanoESP32-C6](https://s.click.aliexpress.com/e/_ooBtUih)* with 16MB flash diff --git a/boards/esp32_s3_crowpanel_2_1.json b/boards/esp32_s3_crowpanel_2_1.json new file mode 100644 index 0000000..958c585 --- /dev/null +++ b/boards/esp32_s3_crowpanel_2_1.json @@ -0,0 +1,47 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "memory_type": "qio_opi" + }, + "core": "esp32", + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "mcu": "esp32s3", + "variant": "esp32s3", + "extra_flags": [ + "-D ARDUINO_ESP32S3_DEV", + "-D ARDUINO_USB_MODE=1", + "-D ARDUINO_USB_CDC_ON_BOOT=1", + "-D BOARD_HAS_PSRAM=1", + "-D ARDUINO_RUNNING_CORE=1", + "-D ARDUINO_EVENT_RUNNING_CORE=1" + ] + }, + "connectivity": [ + "wifi", + "bluetooth", + "usb" + ], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": [ + "esp-builtin" + ] + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "Elecrow CrowPanel 2.1 inch ESP32-S3-N8 (16M Flash 8M PSRAM)", + "upload": { + "flash_size": "16MB", + "maximum_ram_size": 524288, + "maximum_size": 16777216, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.elecrow.com/crowpanel-2-1inch-hmi-esp32-rotary-display-480-480-ips-round-touch-knob-screen.html", + "vendor": "Elecrow" +} \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index ab57a2b..f938fe1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -262,6 +262,13 @@ build_flags = -D USE_SX1280 ; -D HIDE_SPLASH_SCREEN +; ESP32-S3 board config with 16MB flash +[env:esp32_s3_crowpanel_2_1] +extends = esp32s3 +board = esp32-s3-devkitc-1 +board_build.variant = ${PIOENV} +board_build.variants_dir = variants +board_build.partitions = partitions/partitions_16mb_ota_phy.csv ; ************ ; * ESP32-P4 * diff --git a/src/idf_component.yml b/src/idf_component.yml deleted file mode 100644 index d752765..0000000 --- a/src/idf_component.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - idf: '>=5.1' diff --git a/variants/esp32_s3_crowpanel_2_1/pins_arduino.h b/variants/esp32_s3_crowpanel_2_1/pins_arduino.h new file mode 100644 index 0000000..3bc3d25 --- /dev/null +++ b/variants/esp32_s3_crowpanel_2_1/pins_arduino.h @@ -0,0 +1,35 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define ESP32_S3_CROWPANEL_2_1 + +static const uint8_t SDA = 38; +static const uint8_t SCL = 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 uint8_t ENCODER_A_PIN = 42; +static const uint8_t ENCODER_B_PIN = 4; + +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; + +// 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 */