MCPcopy Index your code
hub / github.com/dpoulson/r2_control

github.com/dpoulson/r2_control @2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.0 ↗ · + Follow
509 symbols 1,322 edges 74 files 117 documented · 23% updated 37d ago2.0 · 2023-07-31★ 446 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

r2_control

Python code to control an R2D2 (or other astromech) from a Raspberry Pi over i2c

A Raspberry Pi is connected to Adafruit i2c servo controllers (http://www.adafruit.com/products/815)

Rewriting to use HTTP and REST.

Flask

Check out the wiki: https://github.com/dpoulson/r2_control/wiki

Main process * Read config * Create objects * Create REST tree * lights * lcd * servo * audio * script

APIs Implemented:

  • /servo/\<body|dome>/list - lists all servos configured
  • /servo/\<body|dome>/\<name>/\<position>/\<duration> - sets servo \<name> to \<position> (from 0 to 1 of full configured swing) over \<duration> (seconds)
  • /servo/close - Close all servos
  • /joystick - Joystick selection functions
  • /joystick/list - List all possible joysticks
  • /joystick/\<stick> - Select a joystick
  • /shutdown - Shutdown system
  • /status - Print current status
  • /sendstatus - Send status via telegram if enabled

Install

Read the wiki.

To see some parts of this in action, follow my instagram: https://www.instagram.com/r2djp/

Core symbols most depended-on inside this repo

isFunction
called by 40
controllers/www/js/jquery-3.6.0.js
jQuery
called by 39
controllers/www/js/jquery-3.6.0.js
stop
called by 25
Hardware/Scripts/ScriptThread.py
locate
called by 23
controllers/ps3/r2_ps3.py
locate
called by 18
controllers/psmove/r2_psmove.py
getAll
called by 14
controllers/www/js/jquery-3.6.0.js
value
called by 13
controllers/xbox360/controller.py
assert
called by 11
controllers/www/js/jquery-3.6.0.js

Shape

Function 307
Method 127
Route 52
Class 23

Languages

Python53%
TypeScript42%
C++5%
PHP1%

Modules by API surface

controllers/www/js/jquery-3.6.0.js112 symbols
controllers/www/js/jquery-3.6.0.min.js81 symbols
controllers/xbox360/controller.py40 symbols
main.py21 symbols
Hardware/Dome/DomeControl.py21 symbols
Hardware/Audio/Vocalizer.py20 symbols
Hardware/Audio/AudioLibrary.py17 symbols
Hardware/Scripts/ScriptControl.py14 symbols
Hardware/Servo/ServoBlueprint.py13 symbols
Hardware/Monitoring/MonitorControl.py13 symbols
firmware/3rdparty/CBI_Logics/LedControl.cpp12 symbols
Hardware/Lights/FlthyHPControl.py11 symbols

For agents

$ claude mcp add r2_control \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact