🛠 Configuring GPIO I/O on PlugMate

TrustKernel PlugMate : Secure Miniature USB-C Computer running PlugOS · intermediaire · Apprenez à interfacer des composants électroniques externes avec PlugMate via son interface GPIO sécurisée.

Objectives

This tutorial aims to understand how to leverage the general-purpose input/output (GPIO) capabilities of the PlugMate. Although the standard USB-C format does not natively expose physical GPIO pins, PlugOS provides an abstraction layer to interact with certified extension modules via the USB-C bus. The goal is to read a digital sensor state and control a simple actuator, strictly respecting system isolation.

Required Equipment

Steps

  1. Physical Preparation: Power off the PlugMate by disconnecting it from the host. Connect the I/O extension module to the PlugMate's USB-C port. Ensure the module is mechanically secure.
  2. Component Connection: On the extension module, identify available GPIO pins. Connect the digital sensor to a pin configured as INPUT and the actuator (LED) to a pin configured as OUTPUT. Respect the voltage levels indicated on the module (typically 3.3V).
  3. Boot and Recognition: Reconnect the PlugMate to your host. Wait for boot completion (approx. 24 seconds). Open the host client and access the system dashboard.
  4. Software Configuration: Launch the « GPIO Manager » app provided in PlugOS. Select the detected extension module. Set the sensor-connected pin to « Read » mode and the LED pin to « Write » mode.
  5. Functional Test: In the GPIO Manager interface, activate the output to turn on the LED. Press the sensor to verify the input state changes in the interface. Data remains confined within the PlugMate's secure container.

Verification

The LED must turn on and off via commands from the PlugOS interface. The sensor state display must change from 0 to 1 upon activation. Check that system logs show no USB communication errors.

Further Learning

Explore the PlugOS local REST API to automate these actions via Python scripts executed in the isolated environment. Note that virtual peripherals (GPS, camera) are not accessible via GPIO but through specific APIs.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials