Skip to content

Commit

Permalink
build(esp32-devkit): apply suggestions from community
Browse files Browse the repository at this point in the history
  • Loading branch information
tspopp committed Jan 21, 2025
1 parent b6e8bf0 commit cc9ff6d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
12 changes: 11 additions & 1 deletion AquaMQTT/include/config/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,21 @@ constexpr uint16_t MQTT_MAX_PAYLOAD_SIZE = 1024;

/**
* Pin assignments for AquaMQTT Board Rev 1.0
*/
* There are different GPIO ports depending on the hardware.
* The ENV_DEVKIT_ESP32 macro is set by the platformio environment.
* By default we use the pin assignments of the Arduino Nano ESP32
*/
#ifdef ENV_DEVKIT_ESP32
constexpr uint8_t GPIO_MAIN_RX = 5;
constexpr uint8_t GPIO_MAIN_TX = 6;
constexpr uint8_t GPIO_HMI_RX = 7;
constexpr uint8_t GPIO_HMI_TX = 8;
#else
constexpr uint8_t GPIO_MAIN_RX = 2;
constexpr uint8_t GPIO_MAIN_TX = 3;
constexpr uint8_t GPIO_HMI_RX = 4;
constexpr uint8_t GPIO_HMI_TX = 5;
#endif
constexpr uint8_t GPIO_SDA_RTC = A4;
constexpr uint8_t GPIO_SCL_RTC = A5;

Expand Down
6 changes: 5 additions & 1 deletion AquaMQTT/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ board = arduino_nano_esp32

[env:esp32-s3-devkitc-1]
framework = arduino
build_flags = -std=c++11
build_flags =
-std=c++11
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_DFU_ON_BOOT=1
-DENV_DEVKIT_ESP32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
10 changes: 10 additions & 0 deletions tools/AquaDebug/include/config/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@ constexpr uint8_t MQTT_MAX_PAYLOAD_SIZE = 255;

/**
* Pin assignments for AquaMQTT Board Rev 1.0
* There are different GPIO ports depending on the hardware.
* The ENV_DEVKIT_ESP32 macro is set by the platformio environment.
* By default we use the pin assignments of the Arduino Nano ESP32
*/
#ifdef ENV_DEVKIT_ESP32
constexpr uint8_t GPIO_MAIN_RX = 5;
constexpr uint8_t GPIO_MAIN_TX = 6;
constexpr uint8_t GPIO_HMI_RX = 7;
constexpr uint8_t GPIO_HMI_TX = 8;
#else
constexpr uint8_t GPIO_MAIN_RX = 2;
constexpr uint8_t GPIO_MAIN_TX = 3;
constexpr uint8_t GPIO_HMI_RX = 4;
constexpr uint8_t GPIO_HMI_TX = 5;
#endif
constexpr uint8_t GPIO_SDA_RTC = A4;
constexpr uint8_t GPIO_SCL_RTC = A5;

Expand Down
6 changes: 5 additions & 1 deletion tools/AquaDebug/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ board = arduino_nano_esp32

[env:esp32-s3-devkitc-1]
framework = arduino
build_flags = -std=c++11
build_flags =
-std=c++11
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_DFU_ON_BOOT=1
-DENV_DEVKIT_ESP32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
Expand Down

0 comments on commit cc9ff6d

Please sign in to comment.