We are having trouble getting our Raspberry Pi 4 to recognize a webcam. We are running the FRC image and can connect to the web interface. The status seem normal.
We are using a Lifecam and the web interface sees it and lets us add it:
We are connected to a laptop with the Pi in server mode and set to writable. When we try to open a stream from the vision settings page, we get the site can’t be reached error. We tried turning off the firewalls and LAN proxy.
We know the camera works because we get an image when plugged into the laptop. Also tried a 2nd Lifecam with the same results. We also tried turning off the driver for the laptop’s built in camera.
We tried uploading a simple python code
from cscore import CameraServer, VideoSource, UsbCamera, MjpegServer
import numpy as np
cs = CameraServer.getInstance()
cvSink = cs.getVideo()
camera = cs.startAutomaticCapture()
outputStream = cs.putVideo(“Name”, 320, 240)
time, img = cvSink.grabFrame(img) if time == 0: # Send the output the error. outputStream.notifyError(cvSink.getError());
but get the error:
Not sure why we get the “no camera available” available.
One more note - the blue LED on the camera turns on briefly when the Pi is started or restarted, but turns off quickly after.
Anyone have a suggestion?