🛠 Managing I/O on the Romu board

Bitmerse Romu Compact USB Development Board (RP2354A) · debutant · Apprenez à interagir avec les composants intégrés de la carte Romu, car elle ne dispose pas de broches GPIO externes classiques.

Objectives

This tutorial aims to understand the specific I/O model of the Romu board. Unlike standard development boards, the Romu lacks accessible GPIO pins for connecting external sensors directly. The goal is to master interaction with embedded components: the RGB LED, push buttons, and debug pads. You will learn to control the light output and read the state of physical inputs present on the PCB.

Required Equipment

Steps

The Romu card is designed to be ultra-compact (15.5 x 12 mm). There are no connectors for Dupont wires. All physical interaction happens via components soldered on the board or test pads.

  1. Understand the lack of external GPIOs
  1. Identify integrated I/O components

Ensure your script correctly targets internal pins. On the RP2354, pins are addressed numerically. For the RGB LED, you must identify the pins corresponding to the Red, Green, and Blue channels.

  1. Configure the MicroPython environment

Use the machine library to control the LED. Here is a generic example to turn the LED red: ```python from machine import Pin import time

  1. Write the LED control code

# Replace numbers with actual Romu pins # (Check RP2354A datasheet for exact mapping) led_r = Pin(25, Pin.OUT) led_g = Pin(26, Pin.OUT) led_b = Pin(27, Pin.OUT)

while True: led_r.value(1) # Turn on red time.sleep(1) led_r.value(0) # Turn off red time.sleep(1) ```

Buttons are generally configured as inputs with an internal pull-up resistor. To detect a press: ```python button = Pin(22, Pin.IN, Pin.PULL_UP)

  1. Read button state

while True: if button.value() == 0: print("Button pressed") led_g.value(1) else: led_g.value(0) ```

Connect the Romu to your PC via its integrated USB Type-A connector. The device should appear as a mass storage device (UF2 mode) or a serial port depending on the bootloader. Copy your .py file to the board.

  1. Flash the code

Verification

After rebooting, the RGB LED should blink according to your program. Press the integrated buttons to verify that the LED changes color or that the message appears on the serial terminal. If nothing happens, check the pin numbers in the RP2354A technical documentation, as they vary depending on specific Romu hardware configurations.

Further Learning

To add external sensors, you must use the debug pads. Solder very thin wires to these pads to access internal GPIO lines not exposed. You can then connect simple I2C or analog sensors, but this cancels the compactness advantage. An alternative is to use the Romu as a HID device (keyboard/mouse) and simulate inputs via software, rather than managing external hardware directly.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials