OffTopic ESP32 question

Hi,
I tried this also but its giving me [No such file or directory] error , is there any other solutions please?
Thanks,
Moayad

There is no need for that include. It's a stock feature as pointed out in the second post in this ancient thread

https://docs.particle.io/reference/device-os/firmware/photon/#servo

If you're still getting an error like

then you are probably putting the code in a .cpp or .h file and not an .ino.
In that case add a #include <Particle.h>.

Or if you are not actually using a Particle device, you are in the wrong forum :wink:

1 Like

It also gives me the same error for <Particle.h> that’s it not a file or directory.
Any other solutions??

What IDE are you using?
What device are you targeting?

1 Like

[ I SOLVED MY PROBLEM ]
(For the next person : if you tried all the previous solutions and it still giving u an compiling error like mine)
Just search for [ ESP32_Arduino_Servo_Library ] download it , it mostly be a zip file, so extract it then move it to the Libraries file in the Arduino file where u have it (and its usually at C:/programs file(x86) or wherever u have it) so after u moved it go to Arduino IDE and go to files -> examples -> ESP32_Servo or something like that , go to Sweep and then put ur code there, everything will work correctly.
Ps: be sure to name the library file without spaces before moving it to the arduino libraries file (ex. Esp32_Servo_Library)
Good Luck,
Moayad.

Your solution suggests we were correct all along (despite not actully answering when asked)