{"id":51946790,"url":"https://github.com/zanderlewis/ecrl","last_synced_at":"2026-07-29T01:01:44.405Z","repository":{"id":367138196,"uuid":"1279260016","full_name":"zanderlewis/ecrl","owner":"zanderlewis","description":"[MIRROR] The Enka-Candler Robotics Language","archived":false,"fork":false,"pushed_at":"2026-07-28T00:47:25.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-28T02:12:52.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codeberg.org/zanderlewis/ecrl","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zanderlewis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-06-24T14:16:30.000Z","updated_at":"2026-07-28T00:47:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zanderlewis/ecrl","commit_stats":null,"previous_names":["zanderlewis/ecrl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zanderlewis/ecrl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanderlewis%2Fecrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanderlewis%2Fecrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanderlewis%2Fecrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanderlewis%2Fecrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zanderlewis","download_url":"https://codeload.github.com/zanderlewis/ecrl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanderlewis%2Fecrl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36012774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-28T02:00:06.341Z","response_time":109,"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":[],"created_at":"2026-07-29T01:01:43.702Z","updated_at":"2026-07-29T01:01:44.347Z","avatar_url":"https://github.com/zanderlewis.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enka-Candler Robotics Language\n\nThe Enka-Candler Robotics Language (ECRL, pronounced `eck-ruhl`) is a language that compiles to Java and the FTC SDK. Because it compiles to the FTC SDK, this language is meant for FTC teams.\n\n## Official Locations\n\nThese are official locations of ECRL. It is recommended to only get ECRL from these locations.\n\n- [Codeberg](https://codeberg.org/zanderlewis/ecrl) - Main Repository\n- [Github](https://github.com/zanderlewis/ecrl) - Mirror Repository\n\n## Getting Started\n\n### Prerequisites\n\n- [Crystal](https://crystal-lang.org/) 1.0 or newer\n- [just](https://github.com/casey/just) (optional, but recommended)\n\n### Build the compiler\n\n```bash\njust build\n```\n\nThis produces the `ecrl` binary at `bin/ecrl`.\n\n### Compile an ECRL program\n\n```bash\njust run path/to/program.ecr\n```\n\nThis writes Java output to `path/to/program.ecr.java`. You can also invoke the compiler directly:\n\n```bash\n./bin/ecrl -s path/to/program.ecr -o path/to/output.java\n./bin/ecrl -s path/to/program.ecr -o path/to/output.java -p com.myteam.teleop\n```\n\nThe `-p` / `--package` flag overrides any `package` directive in the source file.\n\n### Run tests\n\n```bash\njust test\n```\n\n## Language Overview\n\nAn ECRL program has a `define` block, optional `routine`s, and **exactly one** OpMode (`teleop` or `autonomous`):\n\n```ecr\npackage \"org.firstinspires.ftc.teamcode.teleop\"\nmodule \"MyRobot\"\n\ndefine {\n    drivetrain {\n        fl: \"leftFront\"  FORWARD\n        fr: \"rightFront\" REVERSE\n        bl: \"leftBack\"   FORWARD\n        br: \"rightBack\"  FORWARD\n    }\n\n    var speed = 1.0\n    dc \"intake\"\n    servo \"wrist\"\n}\n\nroutine pulse_intake(power) {\n    robot.intake.set_power(power)\n    wait(0.5)\n    robot.intake.stop()\n}\n\nteleop \"Drive Mode\" group \"Main\" {\n    loop {\n        drive(\n            deadzone(gpad1.left_stick_y, 0.05),\n            deadzone(gpad1.left_stick_x, 0.05),\n            deadzone(gpad1.right_stick_x, 0.05)\n        )\n\n        if gpad1.square \u0026\u0026 gpad2.triangle {\n            robot.intake.set_power(speed * 0.5)\n        } else if gpad1.right_trigger \u003e= 0.5 {\n            robot.intake.stop()\n        }\n\n        while gpad1.dpad_up {\n            pulse_intake(1.0)\n        }\n\n        robot.wrist.set_position(0.5)\n        robot.tel.show(\"Speed\", \"Target: #{speed}\")\n        robot.tel.update()\n    }\n}\n```\n\nAutonomous programs use a sequential body (no outer `loop`):\n\n```ecr\npackage \"org.firstinspires.ftc.teamcode.auto\"\nmodule \"RedAuto\"\n\ndefine {\n    drivetrain {\n        fl: \"lf\" FORWARD\n        fr: \"rf\" REVERSE\n        bl: \"lb\" FORWARD\n        br: \"rb\" FORWARD\n    }\n    dc \"intake\"\n}\n\nautonomous \"Red Auto\" group \"Auto\" {\n    drive(0.5, 0.0, 0.0)\n    wait(1.5)\n    drive(0.0, 0.0, 0.0)\n\n    for i = 0; i \u003c 3; i = i + 1 {\n        wait(0.25)\n    }\n}\n```\n\n### Features\n\n- `!` starts a line comment\n- `package` sets the generated Java package (default: `org.firstinspires.ftc.teamcode.teleop`)\n- `module` sets the generated Java class name\n- `define` declares hardware, variables, and the mecanum drivetrain\n- `teleop` / `autonomous` — exactly one OpMode per file (`@TeleOp` or `@Autonomous`)\n- `routine name(params) { ... }` — reusable void helpers; call with `name(args)`\n- `gpad1.*` maps to `gamepad1.*`; `gpad2.*` maps to `gamepad2.*`\n- Arithmetic in values: `+`, `-`, `*`, `/`, parentheses, unary `-`\n- `while cond { }` and `for i = init; cond; i = step { }`\n- `wait(seconds)` — interruptible delay (`waitSeconds` helper)\n- `deadzone(value, threshold)` — builtin stick deadzone helper\n- `dc` / `servo` declare motors and servos\n- `if` supports comparisons (`\u003e`, `\u003c`, `\u003e=`, `\u003c=`, `==`, `!=`), `\u0026\u0026`, and `||`\n- `robot.\u003cdevice\u003e.set_power/set_velocity/stop` controls motors; `set_position` controls servos\n- `robot.tel.show/update` handles telemetry\n\n## Examples\n\n- [Limelight Robotics #23574 2025-2026 TeamCode re-creation](examples/limelightrobotics_2025remake.ecr) — full competition-style teleop with multiple motors\n- [Dual driver arm](examples/dual_driver_arm.ecr) — two-gamepad setup with servos, deadzone, and compound conditions\n- [Simple auto](examples/simple_auto.ecr) — autonomous with routines, `wait`, and `for`\n\nCompile an example with:\n\n```bash\njust buildrun examples/dual_driver_arm.ecr\n```\n\nOr the autonomous example:\n\n```bash\njust buildrun examples/simple_auto.ecr\n```\n\n## Contributing\n\nECRL is open to contributions! To contribute, follow these steps:\n\n1. Fork the repository here: [https://codeberg.org/zanderlewis/ecrl](https://codeberg.org/zanderlewis/ecrl)\n2. Create a new branch: `git switch -c my-awesome-new-feature`\n3. Make your changes and run `just test`\n4. Commit and submit a pull request describing your changes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanderlewis%2Fecrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzanderlewis%2Fecrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanderlewis%2Fecrl/lists"}