Skip to content

Commit 2d25872

Browse files
committed
fix(init): no serial output for esp32-s3-box boards #23
1 parent 7f659f1 commit 2d25872

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

src/project/boards.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,18 @@ export const boards = [
1010

1111
// ESP32-based boards
1212
{ title: 'ESP32-C3 Rust DevKit', board: 'board-esp32-c3-rust-1', family: 'esp32' },
13-
{ title: 'ESP32-S3-BOX', board: 'board-esp32-s3-box', family: 'esp32' },
14-
{ title: 'ESP32-S3-BOX-3', board: 'board-esp32-s3-box-3', family: 'esp32' },
13+
{
14+
title: 'ESP32-S3-BOX',
15+
board: 'board-esp32-s3-box',
16+
family: 'esp32',
17+
serialPins: { RX: 'G44', TX: 'G43' },
18+
},
19+
{
20+
title: 'ESP32-S3-BOX-3',
21+
board: 'board-esp32-s3-box-3',
22+
family: 'esp32',
23+
serialPins: { RX: 'G44', TX: 'G43' },
24+
},
1525
{ title: 'M5Stack CoreS3', board: 'board-m5stack-core-s3', family: 'esp32' },
1626

1727
// RP2040-based boards

src/project/createDiagram.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
import { boards } from './boards.js';
2+
13
export function createDiagram(board: string) {
4+
const boardInfo = boards.find((b) => b.board === board);
5+
const serialPins = boardInfo?.serialPins ?? { RX: 'RX', TX: 'TX' };
6+
27
return {
38
version: 1,
49
author: 'Uri Shaked',
510
editor: 'wokwi',
611
parts: [{ type: board, id: 'esp' }],
712
connections: [
8-
['esp:TX', '$serialMonitor:RX', ''],
9-
['esp:RX', '$serialMonitor:TX', ''],
13+
[`esp:${serialPins.TX}`, '$serialMonitor:RX', ''],
14+
[`esp:${serialPins.RX}`, '$serialMonitor:TX', ''],
1015
],
1116
};
1217
}

0 commit comments

Comments
 (0)