Search code examples
javawpilib

FRC Limelight not posting to NetworkTables


I have a roborio 1, limelight 2, OpenMesh radio and this code:

SmartDashboard.putNumber(NetworkTableInstance.getDefault().getTable("limelight").getEntry("tx").getDouble(0));

However, SmartDashboard reads 0. ShuffleBoard NetworkTable viewer does not show the limelight. I have set the team number and IP in the Limelight config. The Limelight config does shoe the value I am trying to read, but the program does not. Why is this and how can it be fixed?


Solution

  • To fix this, you have to set all of you IP addresses as follows:

    RoboRio 10.TE.AM.2
    Go to the diagnostics tab of the DriverStation while connected over WiFi. After Robot there will be an IP address. Browse to this, and go to the tab on the bottom in the menu. Set the bar that says, DHCP or Link Local to Static, then set the IPv4 to 10.TE.AM.2.

    Driver Station 10.TE.AM.5
    I am not going into much detail here, as it depends on your operating system. Do some research and set the static IP of your Driver Station computer to 10.TE.AM.5. LEAVE GATEWAY BLANK!

    Limelight 10.TE.AM.11
    While connected to the robot, browse to limelight.local:5801. Go to the settings tab and set IP assignment to static. Set IPv4 to 10.TE.AM.11, and gateway to 10.TE.AM.1

    Substitute TE.AM with you team number.
    EXAMPLE:
    Team 8193:
    10.81.93.2
    Team 27:
    10.0.27.2 Team 369:
    10.3.69.2