diff --git a/esp32cam-demo.ino b/esp32cam-demo.ino index e68386f..895c71d 100644 --- a/esp32cam-demo.ino +++ b/esp32cam-demo.ino @@ -83,7 +83,7 @@ // --------------------------------------------------------------- const char* stitle = "ESP32Cam-demo"; // title of this sketch - const char* sversion = "18Jan22"; // Sketch version + const char* sversion = "19Jan22"; // Sketch version bool sendRGBfile = 0; // if set '/rgb' will just return raw rgb data which can be saved as a file rather than display a HTML pag @@ -111,7 +111,7 @@ int brightLEDbrightness = 0; // initial brightness (0 - 255) const int ledFreq = 5000; // PWM settings const int ledChannel = 15; // camera uses timer1 - const int ledRresolution = 8; + const int ledRresolution = 8; // resolution (8 = from 0 to 255) const int iopinA = 13; // general io pin 13 const int iopinB = 12; // general io pin 12 (must not be high at boot) @@ -534,7 +534,7 @@ bool cameraImageSettings() { void setupFlashPWM() { ledcSetup(ledChannel, ledFreq, ledRresolution); ledcAttachPin(brightLED, ledChannel); - brightLed(brightLEDbrightness); // change bright LED + brightLed(brightLEDbrightness); } // change illumination LED brightness @@ -1335,28 +1335,25 @@ void handleTest() { - -// draw on camera image using javascript / html canvas - // load live camera image without displaying it - client.print("\n"); - // create a html canvas - client.print(""); - client.print("Your browser does not support the HTML5 canvas tag. \n"); - // javascript - client.print (R"=====()====="); +// demo of drawing on the camera image using javascript / html canvas +// could be of use to show area of interest on the image etc. +// creat a DIV and put image in it with a html canvas on top of it + int tWidth = 640; // image dimensions on web page + int tHeight = 480; + client.println("
"); + client.println(""); + client.println(""); + client.println("
"); +// javascript to draw on the canvas + client.print (R"=====(\n)====="); /* @@ -1368,7 +1365,7 @@ void handleTest() { else if (FRAME_SIZE_IMAGE == FRAMESIZE_VGA) FRAME_SIZE_IMAGE = FRAMESIZE_XGA; else if (FRAME_SIZE_IMAGE == FRAMESIZE_XGA) FRAME_SIZE_IMAGE = FRAMESIZE_SXGA; else FRAME_SIZE_IMAGE = FRAMESIZE_QVGA; - initialiseCamera(); // restart camera + initialiseCamera(); client.println("Camera resolution changed to " + String(FRAME_SIZE_IMAGE)); */ @@ -1404,7 +1401,7 @@ void handleTest() { // ------------------------------------------------------------------- - client.write("

Return\n"); // link back + client.println("

Return"); // link back sendFooter(client); // close web page } // handleTest