Two USB camera errors

I want to connect two USB cameras using the USB plugs on the roboRIO. I believe I have the correct coding and I have programmed a button on the joystick to switch between the two streams. These are attached to my smartdashboard.
When I first boot up the system, I have, say, camera 0 displaying its video. When I switch to camera 1, I get an error message on the FRC driver station that says device or resources busy or cannot allocate buffers. I have the camera’s frame rate down to 1 fps. Is this error a laptop’s low RAM availability issue ? Where are these buffers that need to be allocated? At the moment, I am using an ethernet cable to talk between my laptop and the roboRIO. I get the same error message when I try and switch back to camera 0 so both streams get locked up.
Thank You

Typically that means you are trying to access the same camera device in two spots. Please share your code… does it look like this example from the docs?

here is my code for the two camera set up.

USB (1.9 KB)

See this previous example for how to properly set up camera switching:

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