View Single Post
  #4   Spotlight this post!  
Unread 18-02-2015, 16:18
JML's Avatar
JML JML is offline
Jlyon
AKA: Jlyon
FRC #3044 (0xBe4)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: 3044
Posts: 17
JML is an unknown quantity at this point
Re: How to make the camera work? (Java)

Our team had trouble viewing the camera on the default dashboard, viewing it with smart dashboard or another program may be easier. To use smart dashboard, you send the image with the camera server class (we don't use automatic capture so we can set the frame rate)

Code:
 int count = 0;

	public void teleopPeriodic() {
		currentTime = Timer.getMatchTime();
		if (count > 3) {
			NIVision.IMAQdxGrab(session, frame, 1);
			CameraServer.getInstance().setImage(frame);
			lastUpdateTime = currentTime;
			count = 0;

		}
		count += 1;
        }
Edit: You also need to hit the play button for it to play on the Default Dashboard

Last edited by JML : 18-02-2015 at 16:24.