🛠 Configuring GPIO I/O on PlugMate
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
- A functional PlugMate with PlugOS installed.
- A TrustKernel-compatible I/O extension module (USB-C male connector).
- A simple digital sensor (e.g., push button or motion detector).
- A basic actuator (e.g., LED with current-limiting resistor).
- Connection wires (jumpers) suitable for the extension module.
- A host computer with the PlugMate client installed.
Steps
- 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.
- 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).
- 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.
- 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.
- 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.