From be24243e4b6c746c5f042ca4a68a3e38080d4261 Mon Sep 17 00:00:00 2001 From: David Montero Date: Wed, 20 May 2026 21:16:33 +0200 Subject: [PATCH] fix(esp32): add GPIO 16/17 pin aliases on DevKit V1 (RX2/TX2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the ESP32 DevKit V1 the silkscreen labels GPIO 16 / 17 as RX2 / TX2, and Esp32Element.PINS_ESP32 only exposed the silkscreen names. Examples that wire to numeric pin "16" or "17" (e.g. ledcAttach(16, 5000, 8) on esp32-pwm-led-rgb) couldn't resolve those names — pinPositionCalculator failed lookups, the wire endpoint fell back to (0,0)/(50,50) and the LED component visually floated off the board, breaking the SPICE netlist for the example. Add "16" and "17" as aliases pointing to the same (134,143) / (134,131) coordinates as RX2 / TX2 so both naming conventions resolve to the same physical pin tip. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/velxio-components/Esp32Element.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/components/velxio-components/Esp32Element.ts b/frontend/src/components/velxio-components/Esp32Element.ts index 32f3d784..8af5e9f3 100644 --- a/frontend/src/components/velxio-components/Esp32Element.ts +++ b/frontend/src/components/velxio-components/Esp32Element.ts @@ -50,7 +50,14 @@ const PINS_ESP32 = [ { name: '2', x: 134, y: 169 }, { name: '4', x: 134, y: 156 }, { name: 'RX2', x: 134, y: 143 }, + // RX2 is the silkscreen label for GPIO 16. Sketches that wire to pin + // '16' (e.g. ledcAttach(16, …) or any example referencing GPIO 16) + // must land on this same coordinate, otherwise pinPositionCalculator + // can't resolve the wire endpoint and the wire visually floats off + // the board. Same story for TX2 / 17 below. + { name: '16', x: 134, y: 143 }, { name: 'TX2', x: 134, y: 131 }, + { name: '17', x: 134, y: 131 }, { name: '5', x: 134, y: 118 }, { name: '18', x: 134, y: 105 }, { name: '19', x: 134, y: 93 },