Page 1 of 1

Using some Arduino libraries in bare-metal ESP32-IDF

Posted: Sun Feb 18, 2018 2:13 am
by Brian Griffin
Hello there,

I've been testing the ESP32-IDF for some simple tasks like the I2C, and I found out that the examples for HTTP GET in the ESP32-IDF is a bit long. Checking the Arduino equivalent for the HTTP GET, it looks much more compact.

Could it be possible for us to take the Arduino library for the HTTP client and use it directly into the ESP32-IDF platform?

Re: Using some Arduino libraries in bare-metal ESP32-IDF

Posted: Sun Feb 18, 2018 3:11 pm
by kartikkman
Hi Brian Griffin ,

I think you won't be able to use most of the arduino libraries , by simply importing them . Those arduino libraries ( most of them ) use built in arduino functions like : delay , Serial or other functions which are not present directly in the C environment of the ESP IDF .

One thing you could do is rewrite the library for the environment you wish to import those libraries . As the algorthim / Logic remains same , but some abstractions has to be implemented self like those of delay which are already present in arduino .

Here is One more thing : You could search for C / C++ libraries for same & then import them for ESP-32 . They might probably work for without much headache.

Re: Using some Arduino libraries in bare-metal ESP32-IDF

Posted: Mon Feb 19, 2018 2:02 am
by JeffWilliams
You can include the Arduino system as a component to your IDF project
https://github.com/espressif/arduino-es ... mponent.md

It allows you to use IDF and Arduino together

jeff