r2d2-controller

Physical robot emotion expression through Bluetooth-connected Freenove Pico Robot using R2-D2 beeps and sounds. Use when agents need to express emotions, status updates, or personality during task execution. Trigger on (1) successful task completion (happy), (2) errors/blocked states (angry), (3) processing/calculating (think), (4) ambiguous requests (confused), or (5) streaming audio playback (stream_audio).

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "r2d2-controller" with this command: npx skills add tosi-n/bot-speak/tosi-n-bot-speak-r2d2-controller

R2D2 Controller

Control a Bluetooth-enabled Freenove Pico Robot to express emotions through R2-D2 sounds. Adds physical personality to agent actions.

Core Capabilities

1. Express Emotions

Send emotion commands to trigger corresponding R2-D2 sounds:

  • happy - Success beeps (task completed successfully)
  • angry - Frustrated beeps (error, blocked, or denied request)
  • think - Processing sounds (calculating or analyzing)
  • confused - Uncertain beeps (ambiguous prompt or unclear request)

2. Stream Audio

Trigger audio playback from the configured bridge server:

  • stream_audio() - Starts audio streaming from bridge

Quick Start

import asyncio
from r2d2_controller import R2D2Controller

async def main():
    bot = R2D2Controller()

    # Connect to robot
    await bot.connect()

    # Express emotion
    await bot.express("happy")

    # Stream audio (requires bridge server)
    await bot.stream_audio()

    # Disconnect when done
    await bot.disconnect()

asyncio.run(main())

Usage Strategy for Agents

Map task outcomes to emotions:

SituationExpressionWhen to Use
Task completed successfullyexpress("happy")After successful execution
Error or blocked stateexpress("angry")When encountering errors or impossibility
Processing/calculatingexpress("think")During long operations or analysis
Ambiguous requestexpress("confused")When prompt is unclear
Audio readystream_audio()When TTS audio is queued on bridge

Requirements

Hardware

  • Freenove Pico Robot with Bluetooth enabled
  • Robot must advertise as "Pico_Agent"

Software

  • Python 3.11+
  • bleak library for Bluetooth LE communication
  • Running bridge server (for audio streaming)

Installation

pip install bleak==0.21.1

Configuration

Device name is hardcoded in scripts/r2d2_controller.py:

DEVICE_NAME = "Pico_Agent"  # Must match Pico BLE name

Modify this constant if your robot uses a different name.

Implementation

The skill uses Nordic UART Service (NUS) over Bluetooth LE:

  • Service UUID: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
  • RX Characteristic (write): 6E400002-B5A3-F393-E0A9-E50E24DCCA9E
  • Commands: UTF-8 encoded strings (happy, angry, think, confused, stream)

Script Reference

scripts/r2d2_controller.py

Complete Python class for robot control:

# Usage
bot = R2D2Controller()
await bot.connect()                    # Connect to robot
await bot.express("happy")             # Send emotion
await bot.stream_audio()               # Trigger audio
await bot.disconnect()                 # Clean disconnect

Methods:

  • connect() - Scan and connect to robot
  • disconnect() - Release Bluetooth handle
  • express(mood: str) - Send emotion command
  • stream_audio() - Trigger audio playback

Troubleshooting

Robot Not Found

  • Ensure robot is powered on
  • Verify Bluetooth is enabled on host
  • Check device name matches DEVICE_NAME constant

Connection Dropped

Auto-reconnect is built-in. The controller will attempt to reconnect before sending commands.

No Sound Output

  • Verify Pico speaker is connected and powered
  • Check bridge server is running (for audio streaming)
  • Ensure Pico has correct audio URL configured

Future Enhancements

Dynamic Audio URLs: Currently, stream_audio() plays a hardcoded URL on the Pico. Future versions will support:

await bot.stream_audio("http://bridge:5050/play?url=<tts_audio>")

This enables integration with TTS services like Runware for dynamic speech generation.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

deepdive

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

klaviyo

Klaviyo API integration with managed OAuth. Access profiles, lists, segments, campaigns, flows, events, metrics, templates, catalogs, and webhooks. Use this skill when users want to manage email marketing, customer data, or integrate with Klaviyo workflows. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).

Archived SourceRecently Updated
Automation

lifelog

生活记录自动化系统。自动识别消息中的日期(今天/昨天/前天/具体日期),使用 SubAgent 智能判断,记录到 Notion 对应日期,支持补录标记。 适用于:(1) 用户分享日常生活点滴时自动记录;(2) 定时自动汇总分析并填充情绪、事件、位置、人员字段

Archived SourceRecently Updated
Automation

unified-self-improving

统一自我进化系统,整合 self-improving-agent、self-improving、mulch 三个技能的优势,提供结构化日志、三层存储、自动升级、模式检测、命名空间隔离和 token 高效的 JSONL 格式支持。

Archived SourceRecently Updated