We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CircuitPython 9.1.0-beta.3 (https://circuitpython.org/board/ai-thinker-esp32-cam/)
import espcamera import board cam = espcamera.Camera( data_pins=board.CAMERA_DATA, external_clock_pin=board.CAMERA_XCLK, pixel_clock_pin=board.CAMERA_PCLK, vsync_pin=board.CAMERA_VSYNC, href_pin=board.CAMERA_HREF, pixel_format=espcamera.PixelFormat.JPEG, frame_size=espcamera.FrameSize.SVGA, i2c=board.I2C(), external_clock_frequency=20_000_000, grab_mode=espcamera.GrabMode.WHEN_EMPTY) f = cam.take() print(len(f))
Traceback (most recent call last): File "<stdin>", line 14, in <module> espidf.IDFError: Requested resource not found
I am trying to take a picture but fails
The text was updated successfully, but these errors were encountered:
it turns out it was documented in the PR (#9231), I'd be nice if this could make it in the official documentation and have a unit test for this board.
Sorry, something went wrong.
This works like a charm:
import socketpool import wifi from adafruit_httpserver import Server, Request, Response import board import espcamera cam = espcamera.Camera( data_pins=board.CAMERA_DATA, external_clock_pin=board.CAMERA_XCLK, pixel_clock_pin=board.CAMERA_PCLK, vsync_pin=board.CAMERA_VSYNC, href_pin=board.CAMERA_HREF, powerdown_pin=board.CAMERA_PWDN, reset_pin=None, i2c=board.I2C(), external_clock_frequency=20_000_000, pixel_format=espcamera.PixelFormat.JPEG, frame_size=espcamera.FrameSize.SVGA, # jpeg_quality=0, # framebuffer_count=0, # grab_mode=espcamera.GrabMode.WHEN_EMPTYi ) from adafruit_httpserver import Server, Request, ChunkedResponse pool = socketpool.SocketPool(wifi.radio) server = Server(pool, debug=True) @server.route("/pic") def chunked(request: Request): frame = cam.take(1) return Response(request, content_type="image/jpeg", body=frame) server.serve_forever(str(wifi.radio.ipv4_address))
Now trying to get multipart working...
Update: the HTTPServer is getting updated to support streaming, see: adafruit/Adafruit_CircuitPython_HTTPServer#95
No branches or pull requests
CircuitPython version
Code/REPL
Behavior
Description
I am trying to take a picture but fails
Additional information
The text was updated successfully, but these errors were encountered: