Hello
I have an error with esp-camwith opencv.js in platformio. I know I am not too familiar. Can you help me.
Here is a photo of the platformio.ini as well as of my error
IN platformio.ini
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
lib_deps = espressif/esp32-camera@^1.0.0
and error in program OCV_ColorTrack_P.cpp
{
“resource”: “/c:/Users/miche/Documents/PlatformIO/Projects/Esp32Cam/src/OCV_ColorTrack_P.cpp”,
“owner”: “cpp”,
“severity”: 8,
“message”: “‘getCommand’ was not declared in this scope”,
“startLineNumber”: 186,
“startColumn”: 21,
“endLineNumber”: 186,
“endColumn”: 21
}
Where does my error come from.
Is it possible this year to give more explanation on the Platformio software. I am less comfortable in it. But I know with your help I’ll make it happen
Michel
Hi.
In the Arduino IDE, you can declare a function at the end of the code.
That doesn’t happen with PlatformIO.
All function definitions should be made before calling the function.
Search for the function definition of the getCommand function. It is at the end of the code.
It starts with this line:
void getCommand(char c){
Then, copy it before the setup().
Let me know if this solves the issue.
Regards,
Sara
Hello Sara
Indeed by placing it at the beginning, that has all erased my error.
Don’t tell anyone about it, but this error is due to my inexperience. AH AH
But it would be good to have more classes on platformio. I would like
Michel
Hi Michel.
No need to be ashamed. We are always learning.
Now you know what to do if you find a similar error.
We’ll try to create more tutorials about VS Code + PIO. You just need to practice. You’ll see that after some time, you won’t want to get back to Arduino IDE.
I’ll close this issue.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara