Upgraded firmware for Simone Giertz's Every Day Calendar that links an ATProto-powered ESP32, for sync with goals.garden 🌱
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add ESP32-S2 board support with auto I2C pin detection

Support both ESP32-S3 and ESP32-S2 QT Py boards. I2C pins are
auto-detected based on CONFIG_IDF_TARGET, so switching boards
only requires changing the `board =` line in platformio.ini.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+23 -7
+14 -3
firmware/esp32/GoalsGardenSync/config.h
··· 18 18 #endif 19 19 20 20 // I2C pins for communication with calendar 21 - // QT Py ESP32-S3: STEMMA QT connector to Calendar's J2 header (SDA/SCL) 22 - #define CALENDAR_I2C_SDA 41 // ESP32 STEMMA QT SDA (GPIO41) -> Calendar J2 SDA 23 - #define CALENDAR_I2C_SCL 40 // ESP32 STEMMA QT SCL (GPIO40) -> Calendar J2 SCL 21 + // STEMMA QT connector to Calendar's J2 header (SDA/SCL) 22 + #if defined(CONFIG_IDF_TARGET_ESP32S2) 23 + // QT Py ESP32-S2 24 + #define CALENDAR_I2C_SDA 7 25 + #define CALENDAR_I2C_SCL 6 26 + #elif defined(CONFIG_IDF_TARGET_ESP32S3) 27 + // QT Py ESP32-S3 28 + #define CALENDAR_I2C_SDA 41 29 + #define CALENDAR_I2C_SCL 40 30 + #else 31 + // Default/fallback - override in config.local.h if needed 32 + #define CALENDAR_I2C_SDA SDA 33 + #define CALENDAR_I2C_SCL SCL 34 + #endif 24 35 25 36 // Legacy serial pins (no longer used - I2C is more reliable) 26 37 // #define CALENDAR_RX_PIN 5
+9 -4
platformio.ini
··· 36 36 37 37 38 38 ; ============================================ 39 - ; Goals Garden Sync - ESP32-S3 (Adafruit QT Py or similar) 39 + ; Goals Garden Sync - ESP32 (Adafruit QT Py or similar) 40 40 ; ============================================ 41 + ; Supported boards - just change the 'board' line: 42 + ; adafruit_qtpy_esp32s3_nopsram - QT Py ESP32-S3 (no PSRAM) 43 + ; adafruit_qtpy_esp32s2 - QT Py ESP32-S2 44 + ; I2C pins are auto-detected based on the board. 41 45 [env:esp32sync] 42 46 platform = espressif32 43 - board = esp32-s3-devkitc-1 47 + board = adafruit_qtpy_esp32s3_nopsram 44 48 framework = arduino 45 49 monitor_speed = 115200 46 50 upload_speed = 921600 47 51 48 52 build_flags = 49 53 -DBUILD_ESP32SYNC 50 - -DARDUINO_USB_CDC_ON_BOOT=1 51 - -DARDUINO_USB_MODE=1 54 + 55 + ; Enable USB CDC Serial (required for native USB boards) 56 + board_build.cdc_on_boot = 1 52 57 53 58 ; Script to add framework library include paths for external lib compilation 54 59 extra_scripts = pre:add_includes.py