ESP32_cam Object recpgnition error

Helllo this is my code the code works 100% however the monitor serial there is an error which is

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
loa⸮⸮⸮⸮fff0030,len:1420
ho 0 tail 12 room 4
load:0x40078000,len:13540
loa⸮⸮⸮⸮0080400,len:3604
entry 0x400805f0

E (892) camera: Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND)
Camera init failed with error 0x105

i am using esp32_cam with ftdi as shown in the pic below

and here is the code
#include <WebServer.h>
#include <WiFi.h>
#include <esp32cam.h>

const char* WIFI_SSID = "ASK4 Wireless (802.1x)";
const char* WIFI_PASS = "mimi12345";

WebServer server(80);

static auto loRes = esp32cam::Resolution::find(320, 240);
static auto midRes = esp32cam::Resolution::find(350, 530);
static auto hiRes = esp32cam::Resolution::find(800, 600);
void serveJpg()
{
auto frame = esp32cam::capture();
if (frame == nullptr) {
Serial.println("CAPTURE FAIL");
server.send(503, "", "");
return;
}
Serial.printf("CAPTURE OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
static_cast(frame->size()));

server.setContentLength(frame->size());
server.send(200, "image/jpeg");
WiFiClient client = server.client();
frame->writeTo(client);
}

void handleJpgLo()
{
if (!esp32cam::Camera.changeResolution(loRes)) {
Serial.println("SET-LO-RES FAIL");
}
serveJpg();
}

void handleJpgHi()
{
if (!esp32cam::Camera.changeResolution(hiRes)) {
Serial.println("SET-HI-RES FAIL");
}
serveJpg();
}

void handleJpgMid()
{
if (!esp32cam::Camera.changeResolution(midRes)) {
Serial.println("SET-MID-RES FAIL");
}
serveJpg();
}

void setup(){
Serial.begin(115200);
Serial.println();
{
using namespace esp32cam;
Config cfg;
cfg.setPins(pins::AiThinker);
cfg.setResolution(hiRes);
cfg.setBufferCount(2);
cfg.setJpeg(80);

bool ok = Camera.begin(cfg);
Serial.println(ok ? "CAMERA OK" : "CAMERA FAIL");

}
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
Serial.print("http://");
Serial.println(WiFi.localIP());
Serial.println(" /cam-lo.jpg");
Serial.println(" /cam-hi.jpg");
Serial.println(" /cam-mid.jpg");

server.on("/cam-lo.jpg", handleJpgLo);
server.on("/cam-hi.jpg", handleJpgHi);
server.on("/cam-mid.jpg", handleJpgMid);

server.begin();
}

void loop()
{
server.handleClient();
}

Welcome to the forum

When you posted your code without code tags did you receive a warning message ?

What has that got to do with using code tags when posting code here ?

my bad but still i had no error

Regarding post #1, could you please put your code that you posted in code tags? Please, code tags?

The way the camera appears to be attached to the connector, I'd say the camera is not properly connected or the camera has been damaged. Post a close up of the camera connection to the connector.

Next are you using 5V or 3.3V from the FTDI to supply the camera.

Now for the test. Post number 1 that you made has code posted in it that is not enclosed in code tags, could you, please, edit that post and enclose the code in code tags?

Firstly i am using 5v on ftdi secondly i got the esp32_cam yesterday so the camera is very new

here is a picture ill send you the code tags in a minute

#include <WebServer.h>
#include <WiFi.h>
#include <esp32cam.h>

const char* WIFI_SSID = "ASK4 Wireless (802.1x)";

[code]
const char* WIFI_PASS = "mimi12345";

[code]

WebServer server(80);

[code]

static auto loRes = esp32cam::Resolution::find(320, 240);

[code]
static auto midRes = esp32cam::Resolution::find(350, 530);

[code]
static auto hiRes = esp32cam::Resolution::find(800, 600);

[code]

void serveJpg()
{
auto frame = esp32cam::capture();

[code]
if (frame == nullptr) {
Serial.println("CAPTURE FAIL");
[code]
server.send(503, "", "");
[code]
return;
}

[code]
Serial.printf("CAPTURE OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
static_cast(frame->size()));
[code]

server.setContentLength(frame->size());

[code]
server.send(200, "image/jpeg");

[code]
WiFiClient client = server.client();

[code]
frame->writeTo(client);

[code]
}

void handleJpgLo()
{
if (!esp32cam::Camera.changeResolution(loRes)) {
Serial.println("SET-LO-RES FAIL");
[code]
}
serveJpg();

[code]
}

void handleJpgHi()
{
if (!esp32cam::Camera.changeResolution(hiRes)) {
Serial.println("SET-HI-RES FAIL");
[code]
}
serveJpg();

[code]
}

void handleJpgMid()
{
if (!esp32cam::Camera.changeResolution(midRes)) {
Serial.println("SET-MID-RES FAIL");
[code]
}
serveJpg();

[code]
}

void setup(){
Serial.begin(115200);

[code]
Serial.println();

[code]
{
using namespace esp32cam;
[code]
Config cfg;
cfg.setPins(pins::AiThinker);
cfg.setResolution(hiRes);
cfg.setBufferCount(2);
cfg.setJpeg(80);
[code]

bool ok = Camera.begin(cfg);
[code] 
Serial.println(ok ? "CAMERA OK" : "CAMERA FAIL");
[code] 

}
WiFi.persistent(false);

[code]
WiFi.mode(WIFI_STA);

[code]
WiFi.begin(WIFI_SSID, WIFI_PASS);

[code]
while (WiFi.status() != WL_CONNECTED) {
delay(500);
[code]
}
Serial.print("http://");

[code]
Serial.println(WiFi.localIP());

[code]
Serial.println(" /cam-lo.jpg");

[code]
Serial.println(" /cam-hi.jpg");

[code]
Serial.println(" /cam-mid.jpg");

[code]

server.on("/cam-lo.jpg", handleJpgLo);

[code]
server.on("/cam-hi.jpg", handleJpgHi);

[code]
server.on("/cam-mid.jpg", handleJpgMid);

[code]

server.begin();

[code]
}

void loop()
{
server.handleClient();

[code]
}


heres some screenshots if it makes it easier

s3

Thanks for the camera connector screen shot the connection looks good.

Images of code suck. Edit your code and place it within code tags, please.

Post a few images that show the connections to the FTDI and the ESP32CAM a bit better, please.

Well, at least you tried to use code tags

The easiest way to add them is, in the IDE, right click and select "Copy for forum". This puts the sketch onto the clipboard and adds the code tags before and after it ready for it to be pasted into a reply in the forum

#include <WebServer.h>
#include <WiFi.h>
#include <esp32cam.h>
 
const char* WIFI_SSID = "ASK4 Wireless (802.1x)";
const char* WIFI_PASS = "mimi12345";
 
WebServer server(80);
 
 
static auto loRes = esp32cam::Resolution::find(320, 240);
static auto midRes = esp32cam::Resolution::find(350, 530);
static auto hiRes = esp32cam::Resolution::find(800, 600);
void serveJpg()
{
  auto frame = esp32cam::capture();
  if (frame == nullptr) {
    Serial.println("CAPTURE FAIL");
    server.send(503, "", "");
    return;
  }
  Serial.printf("CAPTURE OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
                static_cast<int>(frame->size()));
 
  server.setContentLength(frame->size());
  server.send(200, "image/jpeg");
  WiFiClient client = server.client();
  frame->writeTo(client);
}
 
void handleJpgLo()
{
  if (!esp32cam::Camera.changeResolution(loRes)) {
    Serial.println("SET-LO-RES FAIL");
  }
  serveJpg();
}
 
void handleJpgHi()
{
  if (!esp32cam::Camera.changeResolution(hiRes)) {
    Serial.println("SET-HI-RES FAIL");
  }
  serveJpg();
}
 
void handleJpgMid()
{
  if (!esp32cam::Camera.changeResolution(midRes)) {
    Serial.println("SET-MID-RES FAIL");
  }
  serveJpg();
}
 
 
void  setup(){
  Serial.begin(115200);
  Serial.println();
  {
    using namespace esp32cam;
    Config cfg;
    cfg.setPins(pins::AiThinker);
    cfg.setResolution(hiRes);
    cfg.setBufferCount(2);
    cfg.setJpeg(80);
 
    bool ok = Camera.begin(cfg);
    Serial.println(ok ? "CAMERA OK" : "CAMERA FAIL");
  }
  WiFi.persistent(false);
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASS);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
  Serial.print("http://");
  Serial.println(WiFi.localIP());
  Serial.println("  /cam-lo.jpg");
  Serial.println("  /cam-hi.jpg");
  Serial.println("  /cam-mid.jpg");
 
  server.on("/cam-lo.jpg", handleJpgLo);
  server.on("/cam-hi.jpg", handleJpgHi);
  server.on("/cam-mid.jpg", handleJpgMid);
 
  server.begin();
}
 
void loop()
{
  server.handleClient();
}

Why does the image of the camera in post#15 have tape on the camera?

Yeah just extra i removed it i still couldnt figure the issue out

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.