@francis Arduino code is C, C++ and all you need to do is #include Arduino.h.
and 'undo' some of your structured 'ini' business in IDF.
Use the listed Arduino libraries.
It is too simple, I think.
-Cheers