Thread: Smart Dashboard
View Single Post
  #2   Spotlight this post!  
Unread 08-02-2014, 07:03
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Smart Dashboard

From what you are saying, it sounds like you are able to get the Java SmartDashboard running, but all you are seeing is the simple Gray window with the File and View options, but none of the information broadcast by your robot.

Here are some things to try:

Select the Preferences option from the File menu and verify that your Team Number is entered correctly.

Temporarily disable your laptop's firewall settings and/or anti-virus program and then restart the smart dashboard to see if your security settings were blocking the smart dashboard.

Make sure the code you have that puts values to the smart dashboard is being reached.

Can you create a project using the SimpleRobotTemplate that does nothing more than displaying a count to the smart dashboard when you run either autonomous or teleop?

Something along the lines of:

Code:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.SimpleRobot;

public class RobotTemplate extends SimpleRobot {

    private int autonCnt = 0;
    private int teleopCnt = 0;

    /**
     * This function is called once each time the robot enters autonomous mode.
     */
    public void autonomous() {
      SmartDashboard.putNumber("Auton Run", autonCnt++);        
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
      SmartDashboard.putNumber("Teleop Run", teleopCnt++);
    }
    
    /**
     * This function is called once each time the robot enters test mode.
     */
    public void test() {
    
    }
}
When you deploy and run the above program, you should see two values appear on the smart dashboard after you run both autonomous and teleop from the driver station. The values should increment each additional time you run autonomous and teleop.

Hope that helps,
Paul
Reply With Quote