SmartDashboard help

I am using command based java on our robot, but no matter what we try we can not get smart dashboard to work. We have a classmate from last year, and we followed the instructions to update everything on it. I have the connection indicator on the dashboard but it is always red. Here is the code I am trying:

    public void teleopPeriodic() {
        SmartDashboard.putDouble("test", 12);

and / or

    public void teleopInit() {
		// This makes sure that the autonomous stops running when
        // teleop starts running. If you want the autonomous to 
        // continue until interrupted by another command, remove
        // this line or comment it out.
        if (autonomousCommand != null) autonomousCommand.cancel();

        SmartDashboard.putDouble("test", 12);

I have tried every possible iteration of code in command and in
We are using the java smart dashboard, our team number is correct, and mDNS is enabled.

If possible, can you describe exactly what the problem is within the dashboard? Is it just that nothing is being displayed?

Have tried using the putNumber() method from the SmartDashboard class instead of the 2 you are using in your code?

Yea I have tried every possible thing in the code, I don’t need to create an object for dashboard or initialise it in Java? I think you do in c++ but we use Java. The problem is that nothing will display at all ever, the connection indicator is ALLWAYS red. I am going to try the dashboard on a different computer to see if it is the driver station. I need the dashboard to work as we are trying to set up a USB eebcam. Thanks!

I find that one of our team’s PCs displays data to the SmartDashboard, one does not. We can’t figure out the difference between the PCs. Both were updated to 2016 in the same way. Either one runs the driver station just fine, but no data ever appears on one of the smartdashboard displays.

That is the exact same problem that we are having, it worked fine last year, but after updating it won’t work anymore.

I don’t know if you have to explicitly instantiate a SmartDashboard object, but our code always had, so if you want to try it and see if it fixes the problem, go for it.

I have tried something like Smart dashboard dash = new Smartdashboard (), but it never worked. Is there anything like Smartdashboard. Start() or initialize? I tried looking it up but I couldn’t find anything.

No, according to the javadocs, there is no start method. Are you sure that the correct dashboard is open?

On a computer connected to your robot which should be sending SmartDashboard data, open Eclipse and select WPILib>Run Outline Viewer. Enter your team’s mDNS address (roborio-####-frc.local) or if that doesn’t work try the default IP address (10.##.##.2) and select Start Client. You should see a folder tree containing all of the values SmartDashboard is writing from the robot. If not, you might want to try a different laptop or check your network settings on the robot or laptop. A simple SmartDashboard.putNumber(“test”, 2); anywhere in code that runs should be all that you need.

I’ll certainly give that a shot. Thanks.

I got it to work perfectly on a different computer.

Outline viewer also does not respond. I turn on the client, and it shows “root” as the only entry.

The robot code isn’t the problem. It works fine on a different PC. There’s obviously something my computer doesn’t like.

The firewall is off. That was causing issues once upon a time. Tis a mystery.

ETA: It occurs to me that the biggest difference between the PC that works and the one that doesn’t is that the one that doesn’t is Windows 10. I wonder if there is some extra setup step required for Windows 10.

The only one that works for me is on Windows 10, there was no extra setup either, although wpi does have steps for if you get an error on Windows 10.

I don’t get an error. I just don’t get my smartdashboard.

I did manage to get the Outline Viewer running. That will be adequate, and the computer where it doesn’t work is not destined to be either the driver station or the backup driver station, so I think we’re ok, even if confused. We have some bigger fish to fry with the software before it takes the field.