TinyML-CAM/[ino]-CameraWebServer.ino

31 lines
751 B
Arduino
Raw Permalink Normal View History

2022-07-23 03:25:28 +00:00
#include "eloquent.h"
2022-07-23 03:26:24 +00:00
#include "eloquent/networking/wifi.h"
#include "eloquent/vision/camera/esp32/webserver.h"
2022-07-23 03:25:28 +00:00
// replace 'm5wide' with your own model
// possible values are 'aithinker', 'eye', 'm5stack', 'm5wide', 'wrover'
#include "eloquent/vision/camera/m5wide.h"
2022-07-23 03:26:24 +00:00
void setup() {
Serial.begin(115200);
2022-07-23 03:25:28 +00:00
2022-07-23 03:26:24 +00:00
// configure camera
camera.jpeg();
camera.qqvga();
2022-07-23 03:25:28 +00:00
2022-07-23 03:26:24 +00:00
// replace with your WiFi credentials
while (!wifi.connectTo("Abc", "12345678"))
Serial.println("Cannot connect to WiFi");
2022-07-23 03:25:28 +00:00
2022-07-23 03:26:24 +00:00
while (!camera.begin())
Serial.println("Cannot connect to camera");
2022-07-23 03:25:28 +00:00
2022-07-23 03:26:24 +00:00
webServer.start();
Serial.print("Camera web server started at http://");
Serial.println(WiFi.localIP());
2022-07-23 03:25:28 +00:00
}
void loop() {
2022-07-23 03:26:24 +00:00
// do nothing
2022-07-23 03:25:28 +00:00
}