Log in

View Full Version : Python: Having problems with USB camera?


team-4480
09-02-2015, 17:49
Hi! We are still trying to get our USB Camera working with this __init__ code: try:
self.camera = wpilib.USBCamera()
self.camera.startCapture()
self.camServ = wpilib.CameraServer()
self.camServ.startAutomaticCapture(self.camera)
except:
self.camera = None
The camera shows up in the RoboRIO web interface but we can't seem to get it to show up in the SmartDashboard or the Driver Station. Maybe I missed a step in setting up the camera since this is the first time I have set a USB Camera up with the RIO. We are using RobotPy and Pyfrc. Any help would be greatly appreciated!

TimTheGreat
09-02-2015, 20:53
hmm... make sure you enabled the camera in the Driverstation. You should be able to select Camera HW (or similar) from the DS. The default is Camera Off, so make sure you change that