Estou fazendo um projeto simples no esp32 cam de 16 pinos, sendo o GPIO 4 o do flash nativo, a ideia dele é tirar fotos a cada tanto tempo e enviar ao google drive.
Através de um script do google scripts que conecta os esp e o google drive.
E o código que está dando erro seguinte:
E (2559) ledc: ledc_get_duty(740): LEDC is not initialized
Connect to script.google.com
Connected to script.google.com failed.
Connect to script.google.com
Connection successful
Código:
// Enter your WiFi ssid and password
const char* ssid = "d BRASIL VIVO";
const char* password = "020802";
String myScript = "AKfycbEFO2QTxUAE8Dvp9JGYQmxLc8jSB4hpiICNlAeHcBb_4WblU8yk3RqA"; //Create your Google Apps Script and replace the "myScript" path.
String myLineNotifyToken = ""; //Line Notify Token. You can set the value of xxxxxxxxxx empty if you don't want to send picture to Linenotify.
String myFoldername = "&myFoldername=ESP32-CAM";
String myFilename = "&myFilename=ESP32-CAM.jpg";
String myImage = "&myFile=";
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#include "Base64.h"
#include "esp_camera.h"
// WARNING!!! Make sure that you have either selected ESP32 Wrover Module,
// or another board which has PSRAM enabled
//CAMERA_MODEL_AI_THINKER
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
void setup()
{