i tried opening the ibeacon_demo.c file with esp32 but had some issue with the .c extension so i changed it to .ino which then opens the file but give this error
"sorry, unimplemented: non-trivial designated initializers not supported
exit status 1"
when compiling.
am sure the error has to do with the extension and the #include files not able to be read by esp32.
so can anyone tell me please how i can run this code with esp32.
thanks..
I checked the code, and that is not arduino code, it is c.
so unless you restructure the code the arduino way (setup(), loop() it is not going to compile, ever....
What line does the compiler complain about? From the message it appears to be using a C feature that the compiler included with the Arduino IDE has not implemented. Perhaps the code can be re-phrased to something the compiler can handle.
When programming an ESP32 you have 2 choices : use the Arduino IDE or use the ESP-IDF programming environment. The code you provide is designed for the last choice, and cannot be used with the Arduino IDE because it does not have a setup nor a loop function.
If you really want to test THIS code, you need to install the ESP-IDF environment, see here. If you accustomed with Arduino, it's not an easy move.
The other solution would be to rewrite the code using ESP32 Arduino-suited libraries and syntax (which is pretty similar to that of the ESP-IDF as they both use C codes, but with the setup and loop things) but I do not recommand that, because you would have to verify that all the libraries called in the code are accessible for the Arduino IDE: