diff --git a/frontend/src/components/simulator/BoardOnCanvas.tsx b/frontend/src/components/simulator/BoardOnCanvas.tsx index d9dfab39..e2aac2a5 100644 --- a/frontend/src/components/simulator/BoardOnCanvas.tsx +++ b/frontend/src/components/simulator/BoardOnCanvas.tsx @@ -3,7 +3,10 @@ import type { BoardInstance } from '../../types/board'; import { ArduinoUno } from '../velxio-components/ArduinoUno'; import { ArduinoNano } from '../velxio-components/ArduinoNano'; import { ArduinoMega } from '../velxio-components/ArduinoMega'; -import { NanoRP2040 } from '../velxio-components/NanoRP2040'; +// NanoRP2040 (wokwi-nano-rp2040-connect) used to back the 'raspberry-pi-pico' +// boardKind by mistake — kept the import out so future contributors don't +// re-wire it back in. If someone genuinely needs a Nano RP2040 Connect +// board (D2..D13 labels), add a new boardKind 'arduino-nano-rp2040'. import { RaspberryPi3 } from '../velxio-components/RaspberryPi3'; import { Esp32 } from '../velxio-components/Esp32'; import { Attiny85 } from '../velxio-components/Attiny85'; @@ -17,7 +20,14 @@ const BOARD_SIZE: Record = { 'arduino-uno': { w: 274, h: 202 }, // 72.58mm × 53.34mm 'arduino-nano': { w: 170, h: 67 }, // 44.9mm × 17.8mm 'arduino-mega': { w: 388, h: 192 }, // 102.66mm × 50.80mm - 'raspberry-pi-pico': { w: 168, h: 68 }, // wokwi-nano-rp2040-connect: 44.573mm × 17.956mm + // Pi Pico physical board is 51mm × 21mm vertical-narrow. The render + // uses velxio's , same Web Component as 'pi-pico-w' + // because the Pico and Pico W are pin-compatible. Used to render the + // wokwi-nano-rp2040-connect (168×68) — that was a completely different + // board with D2-D13 pin labels, so wires in pico examples that + // referenced GP10/GP18/etc. landed at (0,0). The render now matches + // the boardKind name. + 'raspberry-pi-pico': { w: 105, h: 264 }, 'raspberry-pi-3': { w: 250, h: 160 }, // RaspberryPi3Element: PI_WIDTH=250 PI_HEIGHT=160 esp32: { w: 141, h: 265 }, // esp32-devkit-v1: 28.2 × 53 mm 'esp32-s3': { w: 128, h: 350 }, // esp32-s3-devkitc-1: 25.5 × 70 mm @@ -76,8 +86,13 @@ export const BoardOnCanvas = ({ return ; case 'arduino-mega': return ; + // 'raspberry-pi-pico' used to render (a wokwi-nano- + // rp2040-connect element with D2-D13 pin labels). That was a + // misnaming bug — the Nano RP2040 Connect is a different board. + // Use the same Pico Web Component as 'pi-pico-w' so the pins are + // labeled GP0..GP28, 3V3, VBUS, etc. — matching the FQBN + // (rp2040:rp2040:rpipico) and every Pi-Pico sketch's #defines. case 'raspberry-pi-pico': - return ; case 'pi-pico-w': return ; case 'raspberry-pi-3':