Skip to main content
NullClaw provides native hardware peripheral support for embedded boards, enabling AI-powered control of GPIO pins, sensors, actuators, and microcontroller flashing.

Overview

NullClaw’s hardware architecture:

Arduino

Serial JSON protocol over USB

Raspberry Pi

Direct GPIO access via sysfs

STM32/Nucleo

Flash & debug via probe-rs

Supported Hardware

Arduino Boards

  • Serial: /dev/ttyACM0 or /dev/ttyUSB0
  • Baud: 9600
  • Protocol: JSON over serial

Raspberry Pi

  • All models with GPIO header (Zero, 3, 4, 5)
  • Direct GPIO via /sys/class/gpio
  • I2C, SPI support planned
  • Native Linux, no external tools

STM32/Nucleo Boards

  • STM32F4, STM32L4, STM32H7 series
  • Nucleo-F401RE, Nucleo-F411RE
  • Flash via probe-rs CLI
  • Debug via SWD/JTAG

Hardware Tools

NullClaw exposes hardware capabilities as tools:

Arduino Setup

Flash Arduino Sketch

Upload the serial JSON protocol sketch:
arduino_bridge.ino
Full protocol implementation available in ~/.nullclaw/workspace/examples/arduino_bridge.ino

Configure NullClaw

config.json

Find Serial Port

Test Connection

Raspberry Pi Setup

Enable GPIO Access

Configure NullClaw

config.json

GPIO Pin Mapping

Raspberry Pi GPIO pins (BCM numbering): Use BCM numbers in commands:

Example Usage

STM32/Nucleo Setup

Install probe-rs

Configure NullClaw

config.json

Flash Firmware

Read/Write Memory

Direct memory access can brick devices. Only use on development boards with recovery options.

Hardware Commands

Scan Devices

Device Info

Flash Firmware

Monitor Serial

I2C Communication

Read sensors via I2C bus:

Configure I2C

config.json

Read I2C Device

Common I2C Sensors

SPI Communication

Communicate with SPI devices:

Configure SPI

config.json

SPI Transfer

Security

Hardware access is restricted:

Serial Port Allowlist

Only specific paths allowed:
Prevents access to system serial devices.

I2C Address Restrictions

config.json
Empty list denies all I2C access.

GPIO Pin Limits

config.json

Memory Access Guards

STM32 memory access:
  • Read-only by default
  • Write requires explicit approval
  • Flash regions protected
  • System memory blocked

Troubleshooting

Device Not Found

Permission Denied

Arduino Not Responding

Check serial protocol:

STM32 Flash Failed

GPIO Pin Not Working

Advanced Usage

Custom Peripheral

Implement custom hardware interface:
custom_board.zig

Multi-Board Setup

config.json
Reference by alias:

Next Steps

Sandboxing

Secure hardware access with sandboxing

AI Providers

Configure AI models for hardware control