Getting Started

Quick Start

This quick start installs the RH01T9k Python API, connects the board over USB, identifies its serial port, and verifies the control connection with Ping.

1. Connect the board

Connect the RH01T9k to the computer using a USB Type-C data cable. Confirm that the board powers on, then wait a few seconds for the computer to detect the serial port.

Note: A charge-only USB cable can power the board but cannot transfer data. Use a USB cable that supports data.
Note: Close any serial terminal, IDE monitor, or other program that may already be using the board's serial port.

2. Install the Python API

The RH01T9k Python API is open source and available on GitHub:

RH01T9k Python API

The API supports Python 3.9 and newer.

Clone the repository:

git clone https://github.com/mildmidwesterner/programmable-spi-slave-emulator.git

Then install the Python package:

cd programmable-spi-slave-emulator/python
python -m pip install .

3. Find the serial port

Identify the serial port assigned to the RH01T9k.

Examples:

Windows:  COM7
Linux:    /dev/ttyUSB0
macOS:    /dev/cu.usbserial-...

The exact name depends on the operating system and connected USB-UART interface.

4. Run Ping

Create a Python script:

from hil import HIL

PORT = "COM7"      # Change to assigned serial port
BAUD = 115200      # Must remain at 115200

with HIL(PORT, BAUD) as board:
    board.ping()
    print("PING OK")

    status = board.get_status()
    print(f"status = 0x{status.raw:04X}")

Change PORT to the assigned serial port.

Keep BAUD at 115200. This is the fixed serial control rate used by the board.

Run the script:

python ping.py

A successful connection should print:

PING OK
status = 0x....

If Ping succeeds, the Python API can communicate with the RH01T9k and the board is ready to configure for SPI emulation.

Next steps

See Hardware Setup before connecting an SPI controller.