FRC | Setting up USB Camera / Camera not working

How exactly do you set up a USB camera to the roboRIO? We have connected the USB camera to the RIO, and we DO have a camera server using javasmartdashboard. Is there an additional step to set up the camera or is there an error? No errors are being displayed on the driver station and it says we are communicating with the RIO. Controllers and other things work, it is only the camera that we are having issues with.


All that displays is “no connection.”

https://wpilib.screenstepslive.com/s/currentCS/m/vision/l/669166-using-the-cameraserver-on-the-roborio

You must add to your code Java:
public void robotInit() {
CameraServer.getInstance().startAutomaticCapture();
}

C++:
void RobotInit()
{
CameraServer::GetInstance()->StartAutomaticCapture();
}

imp


Here is our code in it. IterativeRobot is not used (?)

Here is the properties of our CameraServer is this helps any.

I figured it out. Thanks. It is 100% working now.

You should share what you found so others can possibly learn or help others

The confusion was basically IterativeRobot. Newer FRC code uses TimedRobot, its vert similar, basically a reincarnate.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.