🛠 Mastering Advanced I/O on BIWCL-PAT: GPIO, Sensors and Display

BIOSSTAR BIWCL-PAT: 3.5" Industrial SBC with Intel Wildcat Lake · avance · Configurez les entrées-sorties numériques, les ports série et l'affichage multi-écrans de la carte industrielle BIOSTAR BIWCL-PAT pour des applications IoT critiques.

Objectives

This tutorial aims to configure the advanced input/output interfaces of the BIOSTAR BIWCL-PAT card. You will learn to manage the 8-bit DIO header for controlling industrial peripherals, utilize RS232/422/485 serial ports for communication with PLCs, and configure triple display (HDMI, DP, LVDS) under Linux. These skills are essential for integration into edge computing systems or interactive kiosks.

Required Materials

Steps

Boot the card on Ubuntu 24.04. Open a terminal and update repositories to ensure compatibility with GPIO and video drivers: ``bash sudo apt update && sudo apt upgrade -y sudo apt install python3-gpiozero python3-serial ``

  1. System Access and Preparation

The DIO header allows direct interaction with industrial components. Under Linux, GPIO pins are often exposed via the sysfs filesystem or libgpiod. Identify the physical pins corresponding to the 8-bit DIO header. For a quick test with gpiozero (which may require specific mapping configuration for this card), create a simple Python script to light an LED connected to a DIO output: ```python from gpiozero import LED from time import sleep

  1. Configuring the 8-bit DIO Header

# Replace 'GPIO17' with the actual pin number mapped to DIO led = LED(17) while True: led.on() sleep(1) led.off() sleep(1) ``` *Note: Check the technical datasheet for the exact mapping of DIO pins to the Intel SoC GPIO lines.*

The card has 4 serial ports. Under Linux, they usually appear as /dev/ttyS0 to /dev/ttyS3. To configure a port in RS485 mode (often used for Modbus), you must handle the Request To Send (RTS) control line. Use pyserial: ```python import serial import time

  1. Using Serial Ports (RS232/422/485)

# Configuration for RS485 (adjust port according to physical pin) ser = serial.Serial('/dev/ttyS1', 9600, timeout=1) ser.rtscts = False ser.dsrdtr = False

while True: ser.write(b'TEST_MSG\n') time.sleep(1) ``` Ensure that physical jumpers (if present) or BIOS settings are set to the desired serial mode (232, 422, or 485).

The card manages three independent outputs via the integrated GPU. Under Linux, use xrandr to check and configure resolutions. To enable the LVDS screen alongside HDMI: ``bash xrandr --output LVDS-1 --mode 1920x1200 --rotate normal xrandr --output HDMI-1 --mode 3840x2160 --right-of LVDS-1 `` This allows having an operator interface on LVDS and a large-format display on HDMI, typical of interactive kiosks.

  1. Managing Triple Display

Verification

Going Further

Explore the integration of M.2 B-Key modules for 4G/5G connectivity to transmit sensor data in real-time. You can also configure a hardware watchdog via GPIOs to restart the card in case of software lockup, thereby increasing reliability in critical industrial environments.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials