I just bought a couple of the xiao esp32-s3 sense boards, and have found that Circuitpython does not support the new (OV3660?) camera sensor. The example code on the Wiki doesn’t work.
import os
import espcamera
import board
import sdcardio
import storage
import time
import busio
import errno
sd = None
try:
sd = sdcardio.SDCard(board.SPI(), board.SDCS)
vfs = storage.VfsFat(sd)
storage.mount(vfs, '/sd')
print(os.listdir('/sd'))
except Exception as e:
print(f"SD card mount failed: {e}")
# OV5640 Camera can do 1600x1200 (UXGA)
FRAME_SIZE = espcamera.FrameSize.VGA
# FRAME_SIZE = espcamera.FrameSize.UXGA
i2c = busio.I2C(board.CAM_SCL, board.CAM_SDA)
cam = espcamera.Camera(
data_pins=board.CAM_DATA,
external_clock_pin=board.CAM_XCLK,
pixel_clock_pin=board.CAM_PCLK,
vsync_pin=board.CAM_VSYNC,
href_pin=board.CAM_HREF,
pixel_format=espcamera.PixelFormat.JPEG,
frame_size=FRAME_SIZE,
i2c=i2c,
external_clock_frequency=20_000_000,
grab_mode=espcamera.GrabMode.WHEN_EMPTY,
framebuffer_count=2,
jpeg_quality=10)
cam.vflip = True
jpeg = cam.take(1)
if jpeg is not None:
print(f"Captured JPEG of length {len(jpeg)}")
if sd is not None:
with open('/sd/test.jpg', 'wb') as f:
f.write(jpeg)
print("Stored JPEG on SD")
print(os.listdir('/sd'))
storage.umount('/sd')
del cam
When I run the above code, I get this response:
Adafruit CircuitPython 10.0.3 on 2025-10-17; Seeed Xiao ESP32-S3 Sense with ESP32S3
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
['.Spotlight-V100', '.fseventsd', 'test.txt']
Traceback (most recent call last):
File "code.py", line 35, in <module>
espidf.IDFError: Operation or feature not supported
Code done running.