ESP32CamTimeLapse/TimeLapse/TimeLapse.ino

43 lines
749 B
Arduino
Raw Normal View History

2020-01-14 03:32:54 +00:00
#include <WiFi.h>
#include "file.h"
#include "camera.h"
#include "lapse.h"
2020-01-30 15:23:39 +00:00
const char *ssid = "iPhone von Marcel";
const char *password = "00000000";
2020-01-14 03:32:54 +00:00
void startCameraServer();
void setup()
{
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();
initFileSystem();
initCamera();
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
startCameraServer();
Serial.print("Camera Ready! Use 'http://");
Serial.print(WiFi.localIP());
Serial.println("' to connect");
2020-01-30 15:23:39 +00:00
// startLapse();
2020-01-14 03:32:54 +00:00
}
void loop()
{
unsigned long t = millis();
static unsigned long ot = 0;
unsigned long dt = t - ot;
ot = t;
processLapse(dt);
}