How ethanjoyner/cornholerobotsoftware works
CornHoleRobotSoftware is a browser-based control system for CHR robots: operators use controller and sequence pages, a Flask-Socket.IO server exchanges commands and telemetry with an Arduino over serial, and robot firmware drives actuators and gathers sensor readings. The README describes the robots as using call-and-response. The Python and browser excerpts show the server and manual-control exchange; Arduino firmware and several browser modules were not sampled, so firmware connections and some feature wiring remain unverified.
Main entry points: CHR-RobotCode.ino Robot controller · chr.py Flask server · socketio3-0-4.js Socket.IO client · seqSensorController.js Sensor controller
Components 19
Operator Web UI
- Manual control
static/js/ctrl.js - Legacy control
static/js/OLDctrl.js - Sensor controller
static/js/seqSensorController.js - Sequence editor
static/js/seq.js - Sequence sensors
static/js/seqSensorController.js - Robot pages
templates - Socket.IO client
socketio3-0-4.js
Control Server
- Flask server
chr.py - Serial interface
chr.py
Robot Firmware
- Robot controller
AudrinoCode/CHR-RobotCode/CHR-RobotCode.ino - Motor control
AudrinoCode/CHR-RobotCode/motor.ino - Arm control
AudrinoCode/CHR-RobotCode/arm.ino - Pressure system
AudrinoCode/CHR-RobotCode/pnuSys.ino - Sequence runtime
AudrinoCode/CHR-RobotCode/sequence.ino - Sensor acquisition
AudrinoCode/CHR-RobotCode/aquireSensors.ino - Gyroscope readings
AudrinoCode/CHR-RobotCode/gryo.ino - Teleoperation
AudrinoCode/CHR-RobotCode/teleop.ino
Robot Hardware
- Robot electronics
Other components
- Robot operator
Connections 21
- Robot operator → Robot pages: opens pages
- Robot pages → Flask server: requests pages
chr.py - Manual control → Socket.IO client: uses client
- Legacy control → Socket.IO client: uses client
- Sensor controller → Socket.IO client: uses client
static/js/seqSensorController.js - Sequence editor → Flask server: sends commands
- Flask server → Serial interface: handles serial
chr.py - Serial interface → Robot controller: exchanges commands
- Robot controller → Motor control: dispatches
- Robot controller → Arm control: dispatches
- Robot controller → Pressure system: dispatches
- Robot controller → Sequence runtime: dispatches
- Robot controller → Sensor acquisition: dispatches
- Robot controller → Gyroscope readings: dispatches
- Robot controller → Teleoperation: dispatches
- Motor control → Robot electronics: actuates
- Arm control → Robot electronics: actuates
- Pressure system → Robot electronics: controls
- Sensor acquisition → Robot electronics: reads sensors
- Serial interface → Flask server: returns telemetry
chr.py - Flask server → Sensor controller: sends telemetry
static/js/seqSensorController.js