Seeed_xiao_esp32s3 pin mapping

Is it possible that pin mapping for this board is wrong ?
As IDE I use VS.Studio and PlatformIO where I set platformio.ini like this:
platform = espressif32
board = seeed_xiao_esp32s3

and I used this code to check the correspondence of the Pins:
#include <Arduino.h>

#define PIN 0

void setup() {
pinMode(PIN, OUTPUT);
}

void loop() {
digitalWrite(PIN, HIGH);
delay(500);
digitalWrite(PIN, LOW);
delay(500);
}

I tried all the Pins from 0 to 10 and I found this assignment different from the official one and I don’t understand why!
PIN DISCOVERED BY CODE

OFFICIAL PIN MAP

You’re confusing “PIN” with “GPIO”

PIN GPIO
D0 1
D1 2
D2 3
D3 4
D4 5
D5 6
D6 43
D7 44
D8 7
D9 8
D10 10
D11 42
D12 41

See pins_arduino.h for the XAIO_ESP32S3 variant

You can use the PIN-Numbering like
digitalWrite(D1, HIGH);
or GPIO numbering:
digitalWrite(2, HIGH);
Both instructions will write to GPIO2 / PIN “D1”

ah ok, now I understand, thank you very much

My project is to use pin 43 & 44 to communicate with barcode reader GM67
following also this project: GitHub - MattFryer/HA-Mealie-Barcode-Scanner: An ESPHome powered barcode scanning device and Home Assistant automation to lookup scanned products and add them to a HA shopping list including one synched with Mealie.

I’m using these definitions:
// GM67 QR Code Reader configuration
#define GM67_RX_PIN 44 // UART RX pin connected to GM67 TX (ESP32 RX receives data from GM67 TX)
#define GM67_TX_PIN 43 // UART TX pin connected to GM67 RX (ESP32 TX sends data to GM67 RX)
#define GM67_UART_NUM 1 // UART port number
#define GM67_BAUD_RATE 9600 // Fixed baud rate for GM67 (9600 N 8 1)
#define GM67_DATA_BITS SERIAL_8N1 // 8 data bits, no parity, 1 stop bit

but i can’t do, do you have any advice?

What do you mean exactly? Do you get an error or what happens / not happens?

Is your project an Arduino based?
Sharing the code might helping easier (github repo?)