Hi,
I am trying to send image data from my ESP32 CAM to losant using the Blob attribute. However, I could not get it working properly.
This is my current code
*camera_fb_t *fb = esp_camera_fb_get();*
* *
* if (!fb) {*
* Serial.println("Failed to get camera frame buffer");*
* return;*
* }*
* char *input = (char *)fb->buf;*
* char output[base64_enc_len(3)];*
* String imageFile = "";*
* *
* for (int i=0;i<fb->len;i++) {*
* base64_encode(output, (input++), 3);*
* if (i%3==0) imageFile += String(output);*
* }*
* StaticJsonDocument<204800> jsonBuffer;*
* JsonObject root = jsonBuffer.to<JsonObject>();*
* root["camera"] = imageFile;*
* device.sendState(root);*
Could anyone help me with this please? Thank you very much.
Regards,
Eric