🛠 Configure Xerxes Pi 2026 I/O

Xerxes Pi 2026 Carrier Board for Raspberry Pi CM4/CM5 Modules · intermediaire · Apprenez à interfacer des capteurs et afficheurs via les connecteurs Qwiic et mezzanine de la carte Xerxes Pi 2026.

Objectifs

This tutorial aims to master Input/Output (I/O) on the Xerxes Pi 2026 carrier board. We will utilize Qwiic connectors for I2C peripherals and the mezzanine connector for specific signals. The goal is to read a sensor and display data on an OLED screen, using the pins exposed by this compact 120 x 40 mm board.

Required Hardware

Steps

  1. Hardware Preparation: Ensure the CM4/CM5 module is firmly seated in the two 100-pin mezzanine connectors. Check the power bridge to select USB-C or PoE. Connect the Qwiic cable from the BME280 sensor to one of the available SH-series connectors on the board.
  2. Software Configuration: Connect via SSH. Enable the I2C interface using the configuration utility:
sudo raspi-config nonint do_i2c 0
sudo reboot
  1. Library Installation: Install the tools needed to communicate with I2C peripherals:
sudo apt update
sudo apt install python3-smbus i2c-tools
  1. Peripheral Detection: Scan the I2C bus to confirm the sensor and display are recognized. You should see their addresses (e.g., 0x76 for BME280, 0x3C for OLED):
sudo i2cdetect -y 1
  1. Test Script: Create a simple Python script to read the sensor and display the temperature on the OLED. Use the adafruit-circuitpython-bme280 and adafruit-circuitpython-ssd1306 libraries.
import board
import busio
import adafruit_bme280
import adafruit_ssd1306

i2c = busio.I2C(board.SCL, board.SDA)
bme = adafruit_bme280.Adafruit_BME280_I2C(i2c)
display = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)

while True:
    display.fill(0)
    display.text(f"Temp: {bme.temperature:.1f}C", 0, 0)
    display.show()
  1. Execution: Run the script. Data should appear on the OLED. If nothing displays, check Qwiic connections and I2C addresses.

Verification

The sensor must transmit consistent data, and the display must update the temperature in real-time. Use dmesg to check for I2C bus errors. The system should remain stable under light load.

Further Reading

Explore I2S audio expansion via Qwiic connectors. Integrate this configuration into Docker for isolated management, as suggested by the macOS monitoring app. Consult the KiCad files on GitHub to understand the routing of CSI and HDMI signals exposed on the mezzanine.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials