Adding a Arduino library to ESP-IDF Project

username
Posts: 477
Joined: Thu May 03, 2018 1:18 pm

Adding a Arduino library to ESP-IDF Project

Postby username » Tue Apr 20, 2021 3:23 pm

I use ESP-IDF for my projects, and cannot tolerate using Arduino. Mainly because they give no access to menuconfig.
On the flip side Arduino does have allot of libs out there, and why re-invent the wheel if I can just somehow pull them into my ESP-IDF project.

I have tried a Arduino project using ArduinoJson, and it works well.
https://github.com/bblanchon/ArduinoJson

Is there a way to put this into an ESP-IDF project ?

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: Adding a Arduino library to ESP-IDF Project

Postby chegewara » Tue Apr 20, 2021 4:07 pm

Yes, you can use arduino as component. There is a lot info on internet about it, but to be honest i dont recommend to use ArduinoJson library, because it has not good memory handling. Instead you can use cJSON from esp-idf, which is easy to use. I am using cJSON even in arduino projects whenever i can.

username
Posts: 477
Joined: Thu May 03, 2018 1:18 pm

Re: Adding a Arduino library to ESP-IDF Project

Postby username » Tue Apr 20, 2021 9:02 pm

Instead you can use cJSON from esp-idf, which is easy to use
Thanks for the tip. I should have looked first, but II just assumed there would not be anything like that in the examples.


Who is online

Users browsing this forum: Bing [Bot] and 119 guests