View Single Post
  #17   Spotlight this post!  
Unread 06-01-2014, 19:20
aaronjeline aaronjeline is offline
Aaron
FRC #1719 (Umbrella Corporation)
Team Role: Programmer
 
Join Date: Nov 2013
Rookie Year: 2013
Location: Baltimore
Posts: 17
aaronjeline is an unknown quantity at this point
Re: Running Smartdashboard without cRIO/robot?

Quote:
Originally Posted by krieck View Post
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);
    }
}
That's still not working for me. Just trying to pass one int to the smartdashboard. Any ideas?
Reply With Quote