Passing data of captured image in esp32-cam to function in .cpp file

nataly
Posts: 12
Joined: Sat Oct 16, 2021 12:16 pm

Passing data of captured image in esp32-cam to function in .cpp file

Postby nataly » Wed Oct 27, 2021 11:45 am

Hi everyone, I have this rr.cpp file

Code: Select all

#include <iostream>
using namespace std;
#include <fstream>
#include <string>
#include <Arduino.h>
//------------------------------------------
void dosome()
{
  ifstream fin("read.txt");     
  ofstream fcom("write.txt");
//Complete the rest of the code 
}
and this rr.h file

Code: Select all

#define rr_h
#include "Arduino.h"
class rr
{
  public:
  rr();
    void dosome();
    

};
and this is my .ino file ,

Code: Select all

// other config 
camera_fb_t * fb = NULL;
fb = esp_camera_fb_get();
now how can I passing fb = esp_camera_fb_get();
to the function in .cpp to write the output of fb = esp_camera_fb_get();
in file and then do some processing on txt file, can do that and how ?

Who is online

Users browsing this forum: No registered users and 46 guests