Hello,
I’v been trying to run the esp cam example on my new esp32s3 sense (the one with the camera). I’m having it take a picture then dump all the bytes thru the serial connection to my python script that catches them and writes them to a file.
For some reason however the images are always corrupted. I’m attaching an image for example (a good looking one, normally they look worse than this) and my main c file and my sdkconfig which are in the zip file.
I would much appreciate all assistance. Thank you.
c_and_sdkconfig.zip (17.9 KB)
If you save the images to the senses SD card, are those corrupted too ?
Did you try to capture images in a lower resolution?
yes i tried a bunch of resolution settings (i dont remember currently exactly which) and a bunch of image quality settings
ok I found the culprit. I was using write(STDOUT_FILENO, buf, len) to write out the bytes to the serial port. turns out that adds a bunch of unexpected things to the stream. the solution was to chunk up the image and use the usb_serial_jtag_write_bytes to write each chunk to the line.
thanks all!
1 Like