Can the esp-idf include some of the Arduino libraries?
I have some arduino library functions I want to implement in my project but don't want to figure out how to mimick objects in C to port the code across.
Thanks
Programming languages for esp-idf (c++)
-
- Posts: 9043
- Joined: Thu Nov 26, 2015 4:08 am
Re: Programming languages for esp-idf (c++)
Yes. ESP-IDF supports C++. Additionally, you can add Arduino support as a subcomponent to ESP-IDF; that should allow you to compile any code that you can compile under the Arduino environment for the esp32.
Re: Programming languages for esp-idf (c++)
Is there a tutorial for using c++ in esp-idf (vscode)?
-
- Posts: 9043
- Joined: Thu Nov 26, 2015 4:08 am
Re: Programming languages for esp-idf (c++)
Not sure why one would be needed... just put your code in a .cpp file instead of a .c file and start writing whatever c++ code you require.
Re: Programming languages for esp-idf (c++)
I added all the cpp files and header files from an arduino project and it does not compile. There are literally hundreds of errors and warnings.
Then tried to make a new project with "Arduino-as-component" but cannot compile the simple project created as I get error " Failed to resolve component 'arduino_tinyusb'."
Many tutorials explain a stepped method for doing things but they seldom run first time, there are almost always "gotcha's" that end up taking hours to resolve and large learning curves. They seldom explain what to do when it does not work as expected.
Now I am on a venture hunting through Google about this tinyuisb issue but cannot find anything straight forward in plain English. Seems the example builder does not produce a usable project and I now have to learn about cmake issues and command line fiddles to see if I can get this issue resolved before I can move onto the next issue.
Then tried to make a new project with "Arduino-as-component" but cannot compile the simple project created as I get error " Failed to resolve component 'arduino_tinyusb'."
Many tutorials explain a stepped method for doing things but they seldom run first time, there are almost always "gotcha's" that end up taking hours to resolve and large learning curves. They seldom explain what to do when it does not work as expected.
Now I am on a venture hunting through Google about this tinyuisb issue but cannot find anything straight forward in plain English. Seems the example builder does not produce a usable project and I now have to learn about cmake issues and command line fiddles to see if I can get this issue resolved before I can move onto the next issue.
Who is online
Users browsing this forum: Bing [Bot] and 123 guests