RX24-Mini-Project-Code
README.md

RX24-Mini-Project-Code

This repository is for the software used in my Captain Rex Mini animatronic project. There are 4 pieces of software - 2 for performance playback, and 2 for performance recording:

Playback

Animatronic Playback System

  • Python script that controls and synchronizes performance timing between video, motors, and LEDs.
  • Runs on a PC computer, which is connected to the ESP32 for LED control, the Pololu Mini Maestro for servomotors, and VLC Media Player for ride show video and audio playback. The ESP32 runs the LED Control System. See diagram:

System architecture diagram.

LED Control System (originally "Animatronic_Control_System_Star_Tours_Demo.ino")

  • C++ code on the ESP32, handles different LED states for eyes, mouth, and dashboard. Receives serial commands from the Animatronic Performance System.
  • This was originally the "Animatronic_Control_System_Star_Tours_Demo.ino", before full performance synchronization was moved to the PC based Animatronic Playback System. This code now only manages the LED commands, and receives its timing instructions from the Animatronic Playback System.

Recording

Servo Animator

  • Connects a game controller to a Pololu Mini Maestro servo controller and allows for individual motor animation to be recorded, played back, and combined.
  • The code is written to connect to a Logitech 3D Extreme Pro, mainly utilizing the throttle for direct 1:1 mapping to a servo motor.

LED Timing Generator

  • Used to manually create a timing array file for synchronizing the mouth LED brightness to audio dialogue.
  • To use, start the recroding and your reference audio, and press the spacebar for every syllable of dialogue.

See files for further instructions and comments.

All initial code was generated using Claude Sonnet 4. Later changes were done by me to correct bugs and features as requirements changed.