Inspiration

Our team wanted to build a hardware project that blended AI with something emotionally meaningful. We all cope with stress by either cracking jokes or leaning on positive affirmations, and we loved the idea of creating a robot that could do both. Since hearing supportive words can genuinely improve mental well‑being, we set out to design a robot that could hype you up or roast you just enough to make you laugh. That idea became Affirmo, complete with a cardboard personality and the now‑iconic 6–7 arm movement.

What it does

Affirmo detects your face using a Raspberry Pi camera, snaps a picture, and decides whether to deliver a roast or a positive affirmation. It then uses the Grok API to generate the message and the ElevenLabs API to convert it into expressive speech. Meanwhile, the ESP32‑controlled servo motors animate Affirmo’s arm in a playful 6–7 motion, giving the robot a lively, interactive personality.

How we built it

We started by experimenting with QNX integration before pivoting to a Raspberry Pi setup for faster development. The Raspberry Pi handles face detection, Wi‑Fi communication, and API orchestration, while two ESP32 microcontrollers control the servo motors and movement logic. We programmed the system in Python using the Thonny IDE, integrated the Grok API for affirmations and roasts, and used ElevenLabs for voice output. Mechanically, we built Affirmo’s body from cardboard.

┌─────────────┐                                     ┌─────────────┐
│   REMOTE    │          ESP-NOW (Wireless)         │    ROBOT    │
│   ESP32     │ ◄─────────────────────────────────► │    ESP32    │
│             │         2.4GHz, ~200m range         │             │
└─────────────┘                                     └─────────────┘
      │                                                   │
      │ Buttons (GPIO 4, 5, 18, 19, 21)                   │ UART (GPIO 16/17)
      │   • ROAST                                         │
      │   • TOGGLE MODE                                   │
      │   • EMOTE 67                                      ▼
      │   • LEFT ARM                              ┌─────────────┐
      │   • RIGHT ARM                             │ RASPBERRY   │
      │                                           │   PI 4      │
      │                                           │             │
      │                                           │ • Camera V3 │
      │                                           │ • WiFi      │
      │                                           │ • Python    │
      │                                           └─────────────┘
      │                                                  │
      │                                                  │ HTTPS
      │                                                  ▼
      │                                           ┌─────────────┐
      │           USB Serial                      │  OPENROUTER │
      ▼           Connection                      │   (Grok)    │
┌─────────────┐ ◄──────────────────────────────── └─────────────┘
│   LAPTOP    │
│             │ ────────────────────────────────► ┌─────────────┐
│ • Python    │           HTTPS                   │ ELEVENLABS  │
│ • Pygame    │                                   │    TTS      │
└─────────────┘                                   └─────────────┘
      │
      │ Audio Output
      ▼
┌─────────────┐
│   SPEAKER   │
│   🔊        │
└─────────────┘

Read more about the full implementation in the GitHub here

Challenges we ran into

We faced several hurdles along the way: getting the Raspberry Pi connected to Wi‑Fi, debugging early QNX attempts, attaching and tuning the servo motors, and making the cardboard structure sturdy enough to survive repeated arm swings. Lighting inconsistencies affected face detection, timing delays caused desynchronization between the Pi and ESP32s, we didn't have enough power to power the servos, missing parts, and rapid prototyping meant lots of pop up fixes. Each challenge pushed us to iterate quickly and collaborate more effectively.

Accomplishments that we're proud of

We’re proud that Affirmo became more than just a hardware demo ; it became a robot with personality. We successfully integrated multiple microcontrollers, APIs, and mechanical components under tight time constraints. We created expressive motion, smooth voice output, and a fun user experience that made people laugh during demos. Seeing users react with genuine joy was one of our biggest wins.

What we learned

We learned how to integrate hardware and software in a cohesive system, how to tune servo motors for expressive movement, how to orchestrate multiple APIs, and how to troubleshoot everything from Wi‑Fi issues to timing delays. We also learned the value of rapid prototyping, clear communication, and designing technology that connects with people emotionally.

What's next for Affirmo

We want to upgrade Affirmo with better materials, more expressive movements, and additional personality modes. Future versions could include customizable voices, user‑selected roast/affirmation intensity, improved face tracking, and a more polished enclosure. We’d also love to explore on‑device models for offline interaction and potentially expand Affirmo into a full emotional‑support‑meets‑comedy companion.

Built With

Share this project:

Updates