
| Signal Name | Xiao Pin | I/O Expander Pin | Direction | ESP32-C3 Pin |
| LED 1 | D1/A1 | - | Output | GPIO3 |
| LED 2 | - | P14 | Output | - |
| LED 3 | - | P15 | Output | - |
| Buzzer | D2/A2 | - | Output | GPIO4 |
| SW1 | - | P07 | Input | - |
| SW2 | - | P06 | Input | - |
| SW3 | - | P05 | Input | - |
| SW4 | - | P04 | Input | - |
| SW5 | D3 | - | Input | GPIO5 |
| SW6 Pos 1 | - | P16 | Input | - |
| SW6 Pos 2 | - | P17 | Input | - |
| SW7 Pos 1 | - | P00 | Input | - |
| SW7 Pos 2 | - | P01 | Input | - |
| SDA | D4 | - | Comms | GPIO6 |
| SCL | D5 | - | Comms | GPIO7 |
| LDR | D0/A0 | - | Analog | GPIO2 |
| Digit 1 | - | P10 | Output | - |
| Digit 2 | - | P11 | Output | - |
| Digit 3 | - | P12 | Output | - |
| Digit 4 | - | P13 | Output | - |
| Seg A | - | P20 | Output | - |
| Seg B | - | P21 | Output | - |
| Seg C | - | P22 | Output | - |
| Seg D | - | P23 | Output | - |
| Seg E | - | P24 | Output | - |
| Seg F | - | P25 | Output | - |
| Seg G | - | P27 | Output | - |
| DP | - | P26 | Output | - |
| XiaoTx | D6 | nINT | - | GPIO21 |
| XiaoMosi | D10 | - | - | GPIO10 |
| XiaoMiso | D9 | - | - | GPIO9 |
| XiaoScl | D8 | - | - | GPIO8 |
| XiaoRx | D7 | - | - | GPIO20 |
cargo install esp-generate --locked
esp-generate --chip esp32c3 -o unstable-hal -o vscode -o esp-backtrace -o log --headless [project_name]
| Register | Port 0 | Port 1 | Port 2 | Purpose |
| Input | 0x00 | 0x01 | 0x02 | Read pin levels |
| Output | 0x04 | 0x05 | 0x06 | Set output pin levels |
| Configuration | 0x0C | 0x0D | 0x0E | Pin dir: 0=out, 1=in |