Skip to content

Commit 882858e

Browse files
committed
Working...
1 parent 14e3b00 commit 882858e

File tree

5 files changed

+801
-1072
lines changed

5 files changed

+801
-1072
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mywifi.h

app_httpd.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
#include "img_converters.h"
1818
#include "Arduino.h"
1919

20-
//#include "camera_index_ov2640.h"
21-
#include "camera_index_plain.h"
20+
#include "camera_index_ov2640.h"
2221
#include "camera_index_ov3660.h"
2322

23+
// Globals needed to set led levels
24+
extern long int ledVal;
25+
extern int ledChannel;
26+
2427
#include "fb_gfx.h"
2528
#include "fd_forward.h"
2629
#include "fr_forward.h"
@@ -529,7 +532,7 @@ static esp_err_t cmd_handler(httpd_req_t *req){
529532
}
530533
else if(!strcmp(variable, "led")) {
531534
Serial.print("LED");
532-
ledVal = toInt(val * 2.55); //Gets the value of the query parameter (0-100) and converts to pwm value
535+
ledVal = (val * 2.55); //Gets the value of the query parameter (0-100) and converts to pwm value
533536
if (ledVal > 255) ledVal = 255; // normalise 0-255 (pwm range) just in case..
534537
if (ledVal < 0 ) ledVal = 0;
535538
ledcWrite(ledChannel, ledVal);

0 commit comments

Comments
 (0)