🛠 Xerxes Pi 2026: Advanced I/O Mastery via Qwiic and GPIO
Objectives
This tutorial aims to configure and debug critical input-output interfaces on the Xerxes Pi 2026 board. We will use the I2C bus via Qwiic connectors for an environmental sensor and GPIO pins for a display or control output, integrating serial debugging to validate signal integrity.
Required Hardware
- Xerxes Pi 2026 board with CM4 or CM5 module inserted.
- USB-C or PoE power supply (with source selection jumper configured).
- Qwiic-compatible I2C sensor (e.g., BME280) and SH-series cable.
- Display module or LED connected to GPIO pins exposed via the mezzanine.
- USB-TTL cable for the dedicated serial connector.
- SSH or serial terminal (PuTTY, minicom) on PC or via the provided macOS app.
Steps
- Hardware Preparation: Insert the CM module into the 100-pin mezzanine connectors. Ensure the power source selection jumper is set to USB-C for the development phase. Connect the Qwiic sensor to one of the SH-series ports and the display module to the corresponding GPIO pins (consult the KiCad schematic for exact mappings).
- Enable I2C and GPIO: Connect via SSH. Edit the configuration file:
sudo nano /boot/firmware/config.txt
Add the following lines to enable interfaces:
dtparam=i2c_arm=on
dtoverlay=gpio-shutdown
Save and reboot:
sudo reboot
- Peripheral Verification: After reboot, scan the I2C bus to confirm sensor detection:
sudo i2cdetect -y 1
You should see the sensor's hexadecimal address (e.g., 0x76 for BME280).
- Data Reading: Install Python tools if necessary and test a quick read:
sudo apt install python3-smbus
python3 -c "import smbus; bus=smbus.SMBus(1); print(hex(bus.read_byte_data(0x76, 0xD0)))"
- Serial Debugging: If signals seem unstable, connect the USB-TTL cable to the dedicated serial connector. Open a serial terminal at 115200 baud. Use the boot pins to force UART mode if necessary, allowing real-time analysis of system logs during GPIO tests.
Verification
Validate that the sensor returns coherent values (temperature, pressure) and that the GPIO switches correctly (LED on/off). Serial logs should show no I2C bus errors (NACK) or pin conflicts. The macOS app should display system status without abnormal latency.
Further Reading
Explore I2S extension via Qwiic connectors for digital audio. Use the open-source KiCad files to design a custom shield leveraging the M.2 NVMe port for massive data storage from sensors, while optimizing active cooling via the PWM connector.
Other tutorials for this board
Code examples for this board
poe-status-monitor.pypythonnvme-benchmark.shbashqwiic-bme280-reader.pypythonpwm-fan-control.pypythonethernet-poe-config.shbashnvme_storage_benchmark-6.inobash