An agent pays 0.01 USDC → servo motor rotates → task confirmed → payment released. Physical proof that x402 controls real hardware.
A real, working RTP robot on a Raspberry Pi. AI agents discover it via the Spraay gateway, pay with x402, and a servo motor physically moves. No simulation — real hardware, real payments.
Everything available on Amazon, total ~$75:
| Item | Purpose | ~Cost |
|---|---|---|
| Raspberry Pi 4 (2GB) | Runs the RTP SDK | $45 |
| 32GB microSD card | OS storage | $10 |
| SG90 Micro Servo Motor | The "robot" actuator | $6 |
| Breadboard + jumper wires kit | Wiring | $8 |
| USB-C power supply (5V 3A) | Power for Pi | $10 |
Optional but great for the demo video:
| Item | Cost |
|---|---|
| Small claw/gripper attachment for servo | $8 |
| Pi Camera Module | $15 |
Raspberry Pi GPIO SG90 Servo
───────────────── ──────────
Pin 2 (5V) ──────► Red wire (power)
Pin 6 (GND) ──────► Brown wire (ground)
Pin 11 (GPIO 17) ──────► Orange wire (signal)
That's it. Three wires.
Download Raspberry Pi Imager, flash Raspberry Pi OS Lite (64-bit) to the SD card. Before flashing, click the gear icon and:
- Enable SSH ✅
- Set username:
pi - Set password: something you'll remember
- Configure WiFi with your network name + password ✅
The Pi connects to your WiFi and you can SSH in immediately — no keyboard or monitor needed.
ssh [email protected]
# Update system
sudo apt-get update && sudo apt-get upgrade -y
# Install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify
node --version # should show v20.x.x
npm --versiongit clone https://github.com/plagtech/rtp-pi-demo.git
cd rtp-pi-demo
npm install
cp .env.example .env
# Fill in your wallet address and Spraay API keyThe Pi needs a public URL for the webhook. Easiest way:
# Install ngrok
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc
sudo apt-get install ngrok
# Start tunnel
ngrok http 3100
# Copy the https://xxx.ngrok.io URL → set as PUBLIC_IP in .envOr if you have a static IP, just open port 3100 on your router.
npx ts-node index.tsYou should see:
🤖 ServoBot-Pi-01 starting up...
✅ Servo homed
📡 Registered as: robo_abc123
💧 x402 endpoint: https://gateway.spraay.app/robots/robo_abc123/task
👂 Listening for tasks on port 3100...
Ready to accept x402 payments 🚀
From any machine:
import { RTPClient } from '@spraay/rtp-sdk'
const client = new RTPClient({ wallet: myX402Wallet })
const robots = await client.discover({ capability: 'pick' })
const result = await client.hire(robots[0], {
task: 'pick',
parameters: { item: 'test-object' }
})
console.log(result.status) // COMPLETED
// Servo physically moved ✅So the robot is always on and listening:
sudo cp rtp-robot.service /etc/systemd/system/
sudo systemctl enable rtp-robot
sudo systemctl start rtp-robotNow the robot boots up, connects to WiFi, registers with Spraay, and starts accepting x402 payments — all automatically.
| Task | What happens | Servo position |
|---|---|---|
pick |
Reach down to grab | 0° → home |
place |
Reach across to drop | 180° → home |
scan |
Angle for scanning (2s hold) | 45° → home |
move |
Go to any angle 0–180° | custom angle |
- RTP Spec — core protocol
- RTP SDK — TypeScript SDK
- RTP XMTP Mesh — peer-to-peer robot mesh
- Spraay Gateway — reference implementation
Built by Spraay Protocol