Newbie question related to camera on ESP32S3 WROOM #49
Replies: 5 comments 3 replies
-
|
Hi. Your pin definitions are wrong, please double check (you can take a look at the aside from that, the easy way would be to simply use the ferrnove-FR and the yous initialize the camera by Next time, please start a discussion or asr the LLM of your choice, since this is not an issue. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Christopher,
Thank you so much for responding to my query.
I apologize for posting my query in the incorrect manner. That being the
first time I've ever posted anything on GitHub.
Having read your reply I downloaded and flashed the firmware using:
https://github.com/cnadler86/micropython-camera-API/releases/download/v0.6.1/mpy_cam-v1.27.0-FREENOVE_ESP32S3_CAM.zip
I took your suggestion of just initializing with cam = Camera(), but still
receive: OSError: [Errno 95] EOPNOTSUPP: ESP_ERR_NOT_SUPPORTED
I then reverted to defining the pins and having looked at the following
(thanks):
// ESP32S3 (WROOM) PIN Map
#ifdef BOARD_ESP32S3_WROOM
#define CAM_PIN_PWDN 38
#define CAM_PIN_RESET -1 //software reset will be performed
#define CAM_PIN_VSYNC 6
#define CAM_PIN_HREF 7
#define CAM_PIN_PCLK 13
#define CAM_PIN_XCLK 15
#define CAM_PIN_SIOD 4
#define CAM_PIN_SIOC 5
#define CAM_PIN_D0 11
#define CAM_PIN_D1 9
#define CAM_PIN_D2 8
#define CAM_PIN_D3 10
#define CAM_PIN_D4 12
#define CAM_PIN_D5 18
#define CAM_PIN_D6 17
#define CAM_PIN_D7 16
#endif
I adjusted my code to:
from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling
import machine
i2c = machine.I2C(0, scl=5, sda=4, freq=400000)
cam = Camera(
data_pins=[11,9,8,10,12,18,17,16],
pclk_pin=13,
vsync_pin=6,
href_pin=7,
xclk_pin=15,
xclk_freq=20000000,
powerdown_pin=38,
reset_pin=-1,
i2c=i2c)
With the same outcome: OSError: [Errno 95] EOPNOTSUPP: ESP_ERR_NOT_SUPPORTED
If there is something else I'm not getting right please let me know.
Grateful,
Mark
P.S. Everything of the best for 2026
…On Fri, Jan 2, 2026 at 7:29 AM Christopher Nadler ***@***.***> wrote:
Hi.
Your pin definitions are wrong, please double check (you can take a look
at the file camera_pins.h.
aside from that, the easy way would be to simply use the ferrnove-FR and
the yous initialize the camera by cam = Camera().
Next time, please start a discussion or asr the LLM of your choice, since
this is not an issue.
—
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BW4OGCIQIUXX5UXSJ6C6WNT4EX623AVCNFSM6AAAAACQIREIYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMZYHEYDGNQ>
.
You are receiving this because you authored the thread.Message ID:
<cnadler86/micropython-camera-API/repo-discussions/49/comments/15389036@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
I am very pleased to hear that you have it working on an ESP32S3 WROOM.
Schematics are on page 23 of the attached document. Unfortunately they mean
little to me.
I'm just an aging programmer who has only recently started dabbling in
microcontrollers. Enjoying the adventure, making stuff that works, but
obviously lacking knowledge on the technical side of things.
…On Fri, Jan 2, 2026 at 7:33 PM Christopher Nadler ***@***.***> wrote:
perhaps there is a enable pin that has to be in a defined state in oder to
activate the camera. Do you have the schematics?
I have a China Version of rhe freenove and works perfectly.
—
Reply to this email directly, view it on GitHub
<#49 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BW4OGCNGW2NL2PZWZVBCQ6L4E2TXVAVCNFSM6AAAAACQIREIYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMZZGI3DSMA>
.
You are receiving this because you authored the thread.Message ID:
<cnadler86/micropython-camera-API/repo-discussions/49/comments/15392690@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Christopher,
The sensor is an OV3660
I have great news though. I think there may have been a dodgy connection to
the camera as I took everything apart and started from scratch.
The following code now actually stores a file called Picture.jpeg, though
when uploaded to my PC it is not recognised as a JPEG image.
from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling
import os
cam = Camera()
try:
print("About to attempt image capture")
Img = bytes(cam.capture())
print("Image taken")
# Get the size in bytes
size_bytes = len(Img)
print(f"Image size in bytes: {size_bytes} bytes")
# Define the full path to the subdirectory
subdirectory_name = "Images"
subdirectory_path = os.getcwd() + subdirectory_name
filename = "picture.jpeg"
file_path = subdirectory_path + '/' + filename
with open(file_path, "wb") as f:
f.write(Img)
except OSError as e:
print(f"Error writing file: {e}")
MPY: soft reboot
About to attempt image capture
Image taken
Image size in bytes: 38400 bytes
So a very positive step forward, followed by a small step back.
…On Fri, Jan 2, 2026 at 9:08 PM Christopher Nadler ***@***.***> wrote:
What is your sensor model? Perhaps this is the problem.
—
Reply to this email directly, view it on GitHub
<#49 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BW4OGCOWN446HUPNKH7POHT4E26ZBAVCNFSM6AAAAACQIREIYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMZZGMZDCNI>
.
You are receiving this because you authored the thread.Message ID:
<cnadler86/micropython-camera-API/repo-discussions/49/comments/15393215@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Greetings Christopher,
As I was not succeeding with image capture using the default camera
settings, consistently getting a file size of 38400 bytes, that wasn't
recognized as a jpeg format image I reverted to defining camera settings:
from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling
import machine
i2c = machine.I2C(0, scl=5, sda=4, freq=400000)
cam = Camera(
data_pins=[11,9,8,10,12,18,17,16],
pclk_pin=13,
vsync_pin=6,
href_pin=7,
xclk_pin=15,
xclk_freq=20000000,
grab_mode=GrabMode.LATEST,
fb_count=2,
frame_size=FrameSize.QVGA,
pixel_format=PixelFormat.JPEG,
powerdown_pin=38,
reset_pin=-1,
i2c=i2c)
This failed to initialize giving:
OSError: Failed to capture initial frame. Construct a new object with
appropriate configuration.
By a process of elimination I discovered that the parameter it is objecting
to is:
pixel_format=PixelFormat.JPEG
If I run the following:
from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling
import machine
i2c = machine.I2C(0, scl=5, sda=4, freq=400000)
cam = Camera(
data_pins=[11,9,8,10,12,18,17,16],
pclk_pin=13,
vsync_pin=6,
href_pin=7,
xclk_pin=15,
xclk_freq=20000000,
grab_mode=GrabMode.LATEST,
fb_count=2,
frame_size=FrameSize.QVGA,
powerdown_pin=38,
reset_pin=-1,
i2c=i2c)
try:
print("About to attempt image capture")
Img = bytes(cam.capture())
print("Image taken")
with open('picture.jpeg', 'wb') as f:
bytes_written = f.write(Img)
print(f"Wrote {bytes_written} bytes.")
except OSError as e:
print(f"Error writing file: {e}")
I get the response:
About to attempt image capture
Image taken
Wrote 153600 bytes.
The resultant image is however still not recognized as a jpeg.
As far I can tell, the default image type for the OV3660 is jpeg.
Perhaps you could shed some light on this mystery.
Many thanks.
…On Fri, Jan 2, 2026 at 9:08 PM Christopher Nadler ***@***.***> wrote:
What is your sensor model? Perhaps this is the problem.
—
Reply to this email directly, view it on GitHub
<#49 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BW4OGCOWN446HUPNKH7POHT4E26ZBAVCNFSM6AAAAACQIREIYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMZZGMZDCNI>
.
You are receiving this because you authored the thread.Message ID:
<cnadler86/micropython-camera-API/repo-discussions/49/comments/15393215@
github.com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings,
I am new to microcontrollers. I'm learning MicroPython and using a Freenove ESP32-S3 WROOM board for development.
I am trying to get the camera working, but fail to even initialise the camera object.
The pin diagram from Freenove shows CAM_SIOD as 4 and CAM_SIOC as 5, and other pins as shown in the code snippet below.
from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling
import machine
i2c = machine.I2C(0, scl=5, sda=4, freq=400000)
cam = Camera(
data_pins=[16,17,18,12,10,8,9,11],
pclk_pin=13,
vsync_pin=6,
href_pin=7,
xclk_pin=15,
xclk_freq=20000000,
powerdown_pin=-1,
reset_pin=-1,
i2c=i2c)
I flashed with a couple of your different releases and received errors dependent on version:
mpy_cam-v1.27.0-FREENOVE_ESP32S3_CAM Error: "OSError: [Errno 1] EPERM: ESP_FAIL"
mpy_cam-v1.27.0-ESP32_GENERIC_S3-SPIRAM_OCT Error: "OSError: [Errno 95] EOPNOTSUPP: ESP_ERR_NOT_SUPPORTED"
All, it would appear, relating to the sda and scl pins.
I tried other pin combinations for I2C too, but received the same results.
There are no devices wired to the board, just the board on its own.
If I scan for devices:
from machine import Pin, I2C
i2c = I2C(0, scl=Pin(5), sda=Pin(4), freq=400000)
devices = i2c.scan()
if devices:
print('I2C devices found:', [hex(device) for device in devices])
else:
print('No I2C devices found')
I2C devices found: ['0x3c']
I am probably making a "newbie" error, but would greatly appreciate it if you could point out where I'm going wrong.
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions