Code migration from an Arduino library.

jimas13
Posts: 6
Joined: Tue Jan 19, 2021 8:36 am

Code migration from an Arduino library.

Postby jimas13 » Sun Mar 07, 2021 11:10 pm

Hello fellow forum-ers.

I have stumbled upon a setback in my project and I am asking for some assistance.

In the past I had thought of a project that involved an Arduino and a fingerprint sensor, for which adafruit provided an basic sdk library, which I used in order to handle all of the functions of the sensor.
When I heard about the capabilities of esp32, I thought of migrating the project,removingg the Arduino from the picture and utilising esp32 as the controller of the sensor. Unfortunately, I have not found a library(header files and c files) that I could use in order to control the sensor.

Is there a way to migrate the code from the library that adafruit has released in to an freertos device?

I believe that such a project might bring unwanted complexity since the header files of the library utilise arduino.h files. I believe that these files do not exist in the compilation of esp-idf... Correct?
Is there anyway that I could avoid re-writing the library in order to replace all of the Apis used in the Arduino namespace?

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: Code migration from an Arduino library.

Postby ESP_Sprite » Mon Mar 08, 2021 1:52 am

You can add the Arduino SDK into your ESP-IDF project as a component. link.

jimas13
Posts: 6
Joined: Tue Jan 19, 2021 8:36 am

Re: Code migration from an Arduino library.

Postby jimas13 » Mon Mar 08, 2021 7:29 am

ESP_Sprite wrote:
Mon Mar 08, 2021 1:52 am
You can add the Arduino SDK into your ESP-IDF project as a component. link.
Please correct me if i am wrong, what you propose is to reference the arduino SDK in my project, leave the library as it is and init the ESP32 module by running a task that communicates with the sensor, while letting FreeRTOS doing its magic with time/processing management of the underlying OS?
What might be the negatives of this approach?

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: Code migration from an Arduino library.

Postby ESP_Sprite » Mon Mar 08, 2021 10:07 am

Yes. Note that Arduino on the ESP32 also uses ESP-IDF/FreeRTOS under the hood; the difference in an Arduino and an ESP-IDF-with-Arduino-component setup are not much different than the different build systems are.

Who is online

Users browsing this forum: Andy Korg, Baidu [Spider], ignisuti, ok-home and 97 guests