Closed maba64 closed 4 years ago
Hello I don't know if this is going to help you but https://youtu.be/Sb08leLWOgA?t=206
WebServer server(80);
void handleCapture(){ auto img = esp32cam::capture(); if (img == nullptr){ server.send(500, "", ""); return; } server.setContentLength(img->size()); server.send(200, "image/jpeg"); WiFiClient client = server.client(); img->writeTo(client); }
void setup() { auto res = esp32cam::Resolution::find(1024, 768); esp32cam::Config cfg; cfg.setPins(esp32cam::pins::AiThinker); cfg.setResolution(res); cfg.setJpeg(80); esp32cam::Camera.begin(cfg); WiFi.softAP(AP_SSID, AP_PASS); server.on("/capture.jpg", handleCapture); server.begin(); }
void loop() { server.handleClient(); }
Hello thanks a lot for the code
there is a possibility to use the code even without WIFI (Outdoor) ev as acces point
Best Regards
Markus