USB Camera isn't Working Through FRC Dashboard

I’m trying to get the Microsoft Lifecam HD-3000 camera working. Our team uses java, and our github is here. The problem stems from two places:

  1. The option to add a USB webcam viewer as outlined in this article is not there. I’d assume this is because the article is out of date. What should I add to view the webcam in the Smart Dashboard?
  2. This is the code that is often recommended to use:
    CameraServer server = CameraServer.getInstance();

This code does not work. It throws an error because the method does not accept a single String (“cam0”). This can easily be resolved by removing the String, but then, how will the code identify the camera? I’d assume this example code that is thrown around often on these forums and by FIRST is outdated.

As of right now, all I’m getting is a black screen on the FRC dashboard. Could anyone provide any java code, or help regarding the FRC dashboard or our code? Thanks.

Remove cam from cam0 which then should work and to add the stream in smartdashboard click view, add, image

That just so happens to be the first thing I tried. I got a black screen from the image.

It needs to be a number, not a string. Or just leave it off entirely (as it defaults to 0).

This is the process that my team used to get the Lifecam HD-3000 working:

  1. The webcam is viewed in Smart Dashboard using CameraServer Stream Viewer widget in Smart Dashboard.

  2. The code my team is currently using to initialize our camera is:


We place this code into our robotInit method and we have had no problem with our camera stream.

More up to date documentation on getting video from the Lifecam HD-3000 is available at:

Thanks for that link. That should solve my problems. I’ll try it out on monday.