View Single Post
  #13   Spotlight this post!  
Unread 01-01-2014, 12:24
krieck's Avatar
krieck krieck is offline
Registered User
AKA: Keith
FRC #2846 (Firebears)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Minnesota
Posts: 49
krieck is an unknown quantity at this point
Re: Running Smartdashboard without cRIO/robot?

In your client code you should specify the IP address and also set up for client mode. Try this:
  1. Start the NetworkTableServer
  2. Start up SmartDashboard with -ip 127.0.0.1
  3. Run the client code below


Code:
import edu.wpi.first.wpilibj.networktables.NetworkTable;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class NetworkingOne {

    public static void main(String[] args) {
        NetworkTable.setClientMode();
        NetworkTable.setIPAddress("127.0.0.1");
        SmartDashboard.putNumber("set value", 0);
        double num = SmartDashboard.getNumber("set value");
        NetworkTable.getTable("SmartDashboard").putNumber("share value", num);
    }
}
Reply With Quote