No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Initial commit Dec 8, 2018
.wpilib Added isConnected thread Jan 4, 2019
gradle/wrapper Added isConnected thread Jan 4, 2019
src/main Clean Up Imports Jan 4, 2019
.gitignore Added Robotbuilder Ignore Dec 9, 2018
README.md Update Readme for new ledMode example. Jan 4, 2019
build.gradle Added isConnected thread Jan 4, 2019
gradlew Added isConnected thread Jan 4, 2019
gradlew.bat
settings.gradle Initial commit Dec 8, 2018

README.md

LimeLight_Library_Example

Java Instructions

Manual Install

  • Copy the oi.limelightvision.limelight.frc package into your src/main/java folder.

Usage

Make a new instance of the driver, and use it however you like. For example:

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import oi.limelightvision.limelight.frc.LimeLight;
import oi.limelightvision.limelight.frc.ControlMode.*;

public class Robot extends IterativeRobot {

  public static final LimeLight _limelight = new LimeLight();
  //public static final LimeLight _limelight = new LimeLight("NetworkTable Key");  //If you renamed your limelight ex: limelight-custome
  
  @Override
  public void robotPeriodic() {
    //Getters
    SmartDashboard.putBoolean("Target Found", _limelight.getIsTargetFound());
    SmartDashboard.putNumber("Deg Rotation to Target", _limelight.getdegRotationToTarget());
    //.....and MORE

    //Setters
    _limelight.setPipeline(1);
    _limelight.setLEDMode(LedMode.kforceOff);
    _limelight.setCamMode(CamMode.kdriver);
    _limelight.setSnapshot(Snapshot.kon);
    _limelight.setStream(StreamType.kPiPMain);
  }

}