{"id":50528371,"url":"https://github.com/steven-tbd/touchdesigner-pca9685-servo-control","last_synced_at":"2026-06-03T10:30:25.526Z","repository":{"id":305809182,"uuid":"402589057","full_name":"steven-tbd/touchdesigner-pca9685-servo-control","owner":"steven-tbd","description":"A multi-modal system for controlling large arrays of hobby servos in 2-DOF (Degrees of Freedom) configurations using TouchDesigner and an ESP32 microcontroller.","archived":false,"fork":false,"pushed_at":"2026-05-20T00:18:12.000Z","size":126,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-20T03:18:28.917Z","etag":null,"topics":["arduino","c-plus-plus","creative-coding","esp32","hobby-servos","kinetic-art","leap-motion","osc","physical-computing","robotics","touchdesigner"],"latest_commit_sha":null,"homepage":"https://stevenmbenton.com/hobby-servo-control-system/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steven-tbd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-02T23:28:33.000Z","updated_at":"2026-05-20T00:18:16.000Z","dependencies_parsed_at":"2025-07-29T03:36:31.460Z","dependency_job_id":null,"html_url":"https://github.com/steven-tbd/touchdesigner-pca9685-servo-control","commit_stats":null,"previous_names":["steven-tbd/hobby-servo-control-system","steven-tbd/scalable-multi-servo-control","steven-tbd/touchdesigner-pca9685-servo-control"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/steven-tbd/touchdesigner-pca9685-servo-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steven-tbd%2Ftouchdesigner-pca9685-servo-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steven-tbd%2Ftouchdesigner-pca9685-servo-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steven-tbd%2Ftouchdesigner-pca9685-servo-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steven-tbd%2Ftouchdesigner-pca9685-servo-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steven-tbd","download_url":"https://codeload.github.com/steven-tbd/touchdesigner-pca9685-servo-control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steven-tbd%2Ftouchdesigner-pca9685-servo-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33860960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","c-plus-plus","creative-coding","esp32","hobby-servos","kinetic-art","leap-motion","osc","physical-computing","robotics","touchdesigner"],"created_at":"2026-06-03T10:30:24.326Z","updated_at":"2026-06-03T10:30:25.519Z","avatar_url":"https://github.com/steven-tbd.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scalable Servo Control with TouchDesigner and PCA9685\n\nA control system for driving arrays of hobby servos in paired 2-DOF X/Y configurations, using TouchDesigner and an ESP32 microcontroller.\n\n## Overview\n\nThe system sends OSC messages over UDP from TouchDesigner to an ESP32, which routes them through a PCA9685 driver board to control servo pairs. The prototype drives 12 servos across 6 paired mechanisms. The architecture scales to larger arrays by adding driver boards.\n\nThree control modes are available in the TouchDesigner network: live gesture control via Leap Motion, a manual slider UI, and pre-programmed keyframe sequences through the Animation COMP.\n\n![Servo Configuration](servo_configuration_image.png)\n\n## Signal Flow\n\n```\n[Leap Motion] ---\u003e (USB HID) ---\u003e [TouchDesigner]\n[TouchDesigner] ---\u003e (Wi-Fi / OSC UDP) ---\u003e [ESP32] ---\u003e (I²C) ---\u003e [PCA9685] ---\u003e (PWM) ---\u003e [12x Hobby Servos]\n```\n\n**2-DOF pairing.** Servos are organized in X/Y pairs throughout the system. TouchDesigner sends paired values, the ESP32 parses them as pairs, and the PCA9685 channels map to the physical mechanism layout.\n\n**OSC over UDP.** TouchDesigner sends OSC messages to the ESP32's IP address over the local network. For permanent installations, switching to a wired serial connection is more reliable than Wi-Fi.\n\n## Control Modes\n\n- **Gesture:** Leap Motion tracks hand position in real time. TouchDesigner maps it to servo targets and streams values over UDP.\n- **Manual:** Slider UI gives direct control over the X and Y axes for all servo pairs.\n- **Animated:** TouchDesigner's Animation COMP drives repeatable keyframe sequences. A Python script inside the `.toe` file generates the keyframe table from a pose table, so sequences are defined as data rather than manually edited curves.\n\n## Repository Contents\n\n**ESP32/**\n- `touchdesigner-udp-com.ino`: Connects to Wi-Fi, listens for OSC messages, and controls the X/Y servo pairs via the PCA9685.\n\n**TouchDesigner/**\n- `motor-control-system_005v2-1.toe`: Control network with switchable inputs for Leap Motion, manual sliders, Animation COMP, and a reset position.\n\n## Hardware\n\n**ESP32** development board\n\n**PCA9685** 16-channel PWM servo driver\n\n**EMAX ES08MA II** hobby servos, or similar\n\n**Leap Motion Controller** gesture sensor\n\n**5 V power supply** for servo power rail\n\n## Software\n\n- **TouchDesigner**\n- **Arduino IDE** with the ESP32 board manager installed\n- **Arduino libraries:** `Adafruit_PWMServoDriver`, `OSC`\n\n## Setup\n\n1. Open `touchdesigner-udp-com.ino` and set your Wi-Fi `ssid` and `password`.\n2. Upload the sketch to the ESP32.\n3. Open `motor-control-system_005v2-1.toe` in TouchDesigner. Update the IP address in the `OSC Out CHOP` to match the ESP32.\n4. Use the mode buttons in the network to switch between Leap Motion, manual, and animated control through the `switch_inputMaster` CHOP.\n\n## Keyframe Generation\n\nThe `.toe` file includes a Python script called `generate_keys_script`. It reads servo poses from the `null_table_keys` table and generates the correctly formatted `keys` table for the Animation COMP. Defining poses as table rows is faster than editing animation curves by hand and makes sequences easier to rearrange or extend.\n\n## Links\n\n- [Project Write-up](https://stevenmbenton.com/hobby-servo-control-system/)\n- [Gesture-Controlled 2-Axis Mechanisms](https://youtu.be/UZ0vq4jCJZ0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteven-tbd%2Ftouchdesigner-pca9685-servo-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteven-tbd%2Ftouchdesigner-pca9685-servo-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteven-tbd%2Ftouchdesigner-pca9685-servo-control/lists"}