🛠 Managing I/O on the Romu board

Bitmerse Romu Compact USB Development Board (RP2354A) · intermediaire · Apprenez à utiliser les pads de débogage et la LED RGB pour interagir avec les entrées-sorties sur la carte Romu.

Objectives

This tutorial aims to understand the I/O architecture of the Romu board. Unlike standard boards, Romu lacks external GPIO headers. We will explore how to access available resources: the integrated RGB LED and debug pads. The goal is to master light output control and understand hardware limitations for designing compact USB peripherals.

Required Materials

Steps

  1. Environment Setup: Install the Raspberry Pi Pico SDK adapted for RP2354. Connect the Romu directly to a USB-A port on your computer. The board is recognized as a native USB device.
  1. Accessing the RGB LED: The RGB LED is the primary output indicator. In your code, identify the internal pins associated with Red, Green, and Blue channels. For example, in MicroPython:
from machine import Pin
import time

# Generic example: internal pins must be verified via schematic
# Assuming internal pins 25 (R), 26 (G), 27 (B) for this example
led_r = Pin(25, Pin.OUT)
led_g = Pin(26, Pin.OUT)
led_b = Pin(27, Pin.OUT)

def set_color(r, g, b):
    led_r.value(not r) # Common active low logic
    led_g.value(not g)
    led_b.value(not b)
  1. Using Debug Pads: Debug pads (SWDIO, SWCLK, GND, 3V3) are for hardware debugging. They are not designed for fast I/O or standard sensors. To read a state, you must solder thin wires or use pogo probes. Do not attempt to connect heavy components.
  1. Control Loop: Implement a loop that changes the LED color to confirm functionality. This validates the compilation chain and code loading on the RP2354.
while True:
    set_color(1, 0, 0) # Red
    time.sleep(0.5)
    set_color(0, 1, 0) # Green
    time.sleep(0.5)
    set_color(0, 0, 1) # Blue
    time.sleep(0.5)
  1. Compile and Flash: Compile your script and transfer it to the board. Romu uses a specific bootloader. Ensure the .uf2 file is correctly copied to the USB mass storage drive.

Verification

Observe the RGB LED. It should change color according to the programmed sequence. If the LED remains off, check power via the USB port and the validity of internal pins used in the code. No response often indicates a compilation error or incorrect pin mapping.

Further Reading

To add inputs, you must use the physical buttons on the board or design an external circuit connected to debug pads with appropriate pull-up resistors. Study USB HID libraries to transform these signals into keyboard or mouse events, leveraging Romu's primary purpose.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials