{"id":16028450,"url":"https://github.com/pepperlola/lights","last_synced_at":"2026-02-13T20:57:25.049Z","repository":{"id":169572278,"uuid":"630786941","full_name":"PepperLola/lights","owner":"PepperLola","description":"A lights ecosystem for FRC teams.","archived":false,"fork":false,"pushed_at":"2024-03-10T01:22:41.000Z","size":1200,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T04:42:06.916Z","etag":null,"topics":["first","frc","led","lights","robotics"],"latest_commit_sha":null,"homepage":"","language":"Java","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/PepperLola.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}},"created_at":"2023-04-21T06:43:38.000Z","updated_at":"2025-01-20T18:39:39.000Z","dependencies_parsed_at":"2023-12-14T03:46:25.550Z","dependency_job_id":"66f9949b-213f-4a31-b1f4-6a546b420eb5","html_url":"https://github.com/PepperLola/lights","commit_stats":null,"previous_names":["pepperlola/lights"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PepperLola/lights","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PepperLola%2Flights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PepperLola%2Flights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PepperLola%2Flights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PepperLola%2Flights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PepperLola","download_url":"https://codeload.github.com/PepperLola/lights/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PepperLola%2Flights/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366673,"owners_count":25975097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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":["first","frc","led","lights","robotics"],"created_at":"2024-10-08T21:00:27.608Z","updated_at":"2025-10-04T20:11:46.968Z","avatar_url":"https://github.com/PepperLola.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PiLED\n### A lights ecosystem for FRC teams\n---\n![Build Status](https://img.shields.io/github/actions/workflow/status/PepperLola/lights/build_image.yml?logo=github\u0026label=Build)\n![GitHub Stars](https://img.shields.io/github/stars/PepperLola/lights?style=flat\u0026logo=github\u0026label=Stars)\n\n## About\n\nPiLED is a project intended to make controlling lights on a robot using a coprocessor far easier. It allows for robot-coprocessor communication using an API built on top of NetworkTables.\nThis means the light states can change based on robot and game events like if the lights were controlled by the RoboRIO, all while pawning off any computation onto the coprocessor rather than the RIO.  \nThe main features of PiLED include:\n- Easy disk image to get a Pi up and running\n- Easy to use API to register LEDs and control effects\n- Custom Pi HAT for power regulation and four connectors for LEDs\n  \nPlanned features:\n- Versatile 3d-printable connectors/mounts for Pi and LEDs\n- Vary effects based on game stage\n- Custom effects\n- Support for more coprocessors\n\n  \n*Note: Currently only the Raspberry Pi 2-4 are supported. However, any board should work as long as the pinout is the same and the Python libraries listed in pi/requirements.txt behave the same.*\n\n## Usage\n\n### Installing on Pi\nTo flash the Pi with the disk image, follow these steps:\n1. Download [Balena Etcher]() or the [Raspberry Pi Imager]()\n2. Download the disk image from the [latest release](https://github.com/PepperLola/lights/releases/latest)\n3. Plug the Raspberry Pi's SD card into your computer\n4. Follow the steps in your chosen imaging software using the SD card and the downloaded disk image\n5. After flashing, insert the SD card into the Pi. It should now be ready for use\n\n### Installing the Java API\nEnsure you have Maven Central listed as a repository, and then add the PiLED library to your `build.gradle` like so:\n```groovy\ndependencies {\n    implementation 'com.pigmice:piled:\u003cVERSION\u003e'\n}\n```\nMake sure you replace `\u003cVERSION\u003e` with your desired [PiLED version](https://central.sonatype.com/artifact/com.pigmice/piled) (e.g. `2024.1.0`). You can find a sample `build.gradle` configuration in the [basic robot code example](https://github.com/PepperLola/lights/tree/main/example/basic/build.gradle#L56).\n\n### Robot Wiring\nAfter imaging the Raspberry Pi, follow these steps to connect the Pi to the robot properly:\n1. Attach the Pi HAT if it isn't already, and mount the Pi to the robot in a place where all necessary wires can reach\n2. Connect the Pi over Ethernet to the RIO somehow. A [switch](TODO) is recommended, although the second port on the radio could be used\n3. Plug in all LEDs to the ports on the Pi HAT. See the [wiki](TODO) for information on wiring without the HAT\n4. Connect the power input of the Pi HAT to your PDH/PDP (not the VRM). Any port that outputs the battery voltage (~12V) and above 10A will work\n5. Hope for no magic smoke when you turn on the robot\n\n### Using the Java API\nExample projects have been included in the `example/` directory. The API affords a lot of freedom when it comes to controlling LEDs, but these are the most important things to note:\n- Set game stage\n  - Set the game stage in each `init` method in `Robot.java` by calling `PiLED.getInstance().setStage(GameStage.\u003c Game Stage \u003e);` (substituting `\u003c Game Stage \u003e` for the corresponding game stage: Disabled, Auto, Teleop, etc.). This will allow effects to change based on the game stage (planned feature but not currently supported)\n- Register LEDs\n  - Create an `LED` instance with a name (string), port (0-4), and length (positive int)\n  - Call `PiLED.getInstance().registerLED(\u003c led \u003e)` where `\u003c led \u003e` is the LED instance\n  - Call `PiLED.getInstance().setAlliance()` with no arguments for the API to automatically get and store the alliance your robot is currently on (set in Driver Station or by FMS)\n- Set Effects\n  - Create an instance of an effect. This could be a built-in effect (such as `SolidEffect`, `RainbowEffect`, `BreatheEffect`, etc.; for a fully updated list, look at the [effects](/robot/src/main/java/com/pigmice/piled/effects) directory in `robot/`)\n  - Call `PiLED.getInstance().setLEDEffect(\u003c led \u003e, \u003c effect \u003e)`, where `\u003c led \u003e` is the LED instance you want to run the effect on and `\u003c effect \u003e` is the effect instance you created previously\n\n## Building\n\n### Building the Image\nThis needs to be run on a Raspberry Pi with Ubuntu installed. Raspberry Pi OS will likely also work but has not been tested. To build the image, follow these steps:\n1. Clone the [`lights-pi-gen`](https://github.com/PepperLola/lights-pi-gen) repository on the Pi and open it in the command line\n2. Install the dependencies using `sudo apt-get install -y quilt qemu-user-static qemu-utils debootstrap zip libarchive-tools git curl grep`\n3. Create a `config` file with containing `IMG_NAME=piled`. This can be done by running `echo \"IMG_NAME=piled\" \u003e config`\n4. Run `./build.sh`. The image iso file will be created in the `export-image/` directory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepperlola%2Flights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepperlola%2Flights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepperlola%2Flights/lists"}