View Single Post
  #5   Spotlight this post!  
Unread 09-02-2011, 18:26
jonjesbuzz jonjesbuzz is offline
Registered User
FRC #1127
 
Join Date: Feb 2011
Location: Milton
Posts: 1
jonjesbuzz is an unknown quantity at this point
Re: How to get the camera working on the default dashboard

We had been having much trouble with our robot's camera system as well, until we came to this thread.

This code worked perfectly in Java.

For testing purposes, we created a new SimpleRobot subclass using the RobotTemplate default method. We imported the wpilibj package and the camera package. And this was what followed it.
Code:
public class RobotTemplate extends SimpleRobot
{
   public RobotTemplate()
   {
        Timer.delay(8);
        AxisCamera camera = AxisCamera.getInstance();
   }
   // The other default methods placed here.
}
To prevent waiting 8 seconds before your robot will run, the AxisCamera camera = AxisCamera.getInstance(); line can be put in the teleopInit() method of an IterativeRobot subclass.

Hopes this helps!