View Single Post
  #2   Spotlight this post!  
Unread 23-02-2016, 19:30
razar51 razar51 is offline
Registered User
AKA: John Faulkner
FRC #1288 (Raven Robotics)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2007
Location: St. Charles, MO
Posts: 10
razar51 is an unknown quantity at this point
Re: Urgent- Python USB Camera not working

You might check that the roborio didn't give your camera a different name. The default name for the camera that the code you have there assumes is 'cam0'.

Last year we had an issue where, when testing different cameras, the roborio would increment the number of the name given to the camera (cam1, cam2, etc.)

We solved this by doing something similar to the following and then using the default dashboard set to HW capture:

Code:
       camera = wpilib.USBCamera(b'cam1')
       server = wpilib.CameraServer.getInstance()
       server.startAutomaticCapture(camera)
You can find the name the roborio gave to your camera by having it plugged in and then using the USB interface to connect to the roborio in a web browser (172.22.11.2). It should list the names of the devices connected to it,
Reply With Quote