Having problems with FRC Driver Station Camera view

So, I’ve been trying to get my camera feed to show up on my driver station. However, no matter what I try, nothing happens! I tried having the USB connected to just the computer. Nothing. I tried connecting the computer to the roboRIO and connecting the camera to the computer. Nothing. I even tried connecting the camera to the roboRIO itself and connecting the computer to the roboRIO, but to no avail.
(note that the computer was able to detect the roboRIO during all of those tries)
please help

What do you mean by “the computer” in this context? What camera are you using? What are you using to view the camera feed on the driver station?

Dashboards only show USB cameras that are connected to the RoboRIO, not cameras connected to the computer.

You also have to add a line of code to your robot code to activate the camera stream. In C++, add the following to RobotInit():

1 Like

I’ll try it now, Thanks for the help

Ok, Update. Still having some problems. The camera can now be detected by the Default Dashboard for the Driver Station. In fact, it says the name of the camera as well, so that’s pretty good. I added the code you said and it worked, but for some reason, though the camera is detected, the feed still can’t be seen. I don’t really understand. Sorry for continuosly asking for help. I’m using the camera that came with the kit, the lifeCam.

Hi, I am one of the programmers for Team 156, and I was having a similar problem. I found a fix: Using the code shared by Peter_Johnson, add “frc::” before the rest of the code, and add a “0” inside the last set of parentheses. This defines which USB port your camera is connected to, which allows the driver station to pick it up. If it still doesn’t work, just switch the USB port the camera is connected to OR change the “0” to a “1”
Good Luck from Team 156 - RPM!