Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/team395/limelight-api
Unofficial API for the Limelight.
https://github.com/team395/limelight-api
first-robotics-competition frc limelight
Last synced: 14 days ago
JSON representation
Unofficial API for the Limelight.
- Host: GitHub
- URL: https://github.com/team395/limelight-api
- Owner: Team395
- License: mit
- Created: 2019-01-10T22:20:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-02T21:38:56.000Z (almost 6 years ago)
- Last Synced: 2024-12-20T17:45:51.704Z (14 days ago)
- Topics: first-robotics-competition, frc, limelight
- Language: Java
- Size: 235 KB
- Stars: 4
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# limelight-api
Unofficial API for the Limelight.
## Adding the Dependency
Add `compile 'com.2train395.limelight.api:limelight-api:1.0.0'` to your Gradle dependencies.
Make sure `mavenCentral()` is added as a repository.
## Building From Source
If you'd like to build the API yourself from the most recent commit (**not recommended**), then run:
```shell
git clone https://github.com/Team395/limelight-api.git
cd limelight-api
./gradlew build
```
The resulting jars can be found in `build/libs`. Assuming you have a Gradle project with the same parent directory as the cloned repository, add the following dependency:
```groovy
compile files('../limelight-api/build/libs/limelight-api-1.0.0.jar')
```
Adjust the path as necessary if your project is elsewhere.
## Using the API
The `Limelight` class provides static methods to access all data posted to NetworkTables by Limelight.
### Examples
To access the target found with the current pipeline:
```java
if (Limelight.hasTarget()) {
Target target = Limelight.getTarget();
// Do stuff with the target
}
```