| name | hardware |
| description | Read and control I2C and SPI peripherals on Sipeed boards (LicheeRV Nano, MaixCAM, NanoKVM). |
| homepage | https://wiki.sipeed.com/hardware/en/lichee/RV_Nano/1_intro.html |
| metadata | {"nanobot":{"emoji":"🔧","requires":{"tools":["i2c","spi"]}}} |
Hardware (I2C / SPI)
Use the i2c and spi tools to interact with sensors, displays, and other peripherals connected to the board.
Quick Start
# 1. Find available buses
i2c detect
# 2. Scan for connected devices
i2c scan (bus: "1")
# 3. Read from a sensor (e.g. AHT20 temperature/humidity)
i2c read (bus: "1", address: 0x38, register: 0xAC, length: 6)
# 4. SPI devices
spi list
spi read (device: "2.0", length: 4)
Before You Start — Pinmux Setup
Most I2C/SPI pins are shared with WiFi on Sipeed boards. You must configure pinmux before use.
See references/board-pinout.md for board-specific commands.
Common steps:
- Stop WiFi if using shared pins:
/etc/init.d/S30wifi stop
- Load i2c-dev module:
modprobe i2c-dev
- Configure pinmux with
devmem (board-specific)
- Verify with
i2c detect and i2c scan
Safety
- Write operations require — always confirm with the user first