USE OLD ARDUINO IDE 1.8.19 IF YOU ARE GETTING analogwrite error THEN ONLY INSTALL THE ESP32_ANALOGWRITE LIBRARY.
https://www.instagram.com/reel/CiXJ53lJ-d4/
https://www.instagram.com/reel/Ci7LDwmrUwm/
https://www.instagram.com/reel/CjQiWjgPsBQ/
https://www.youtube.com/watch?v=DRXjLnhupkE
https://www.instructables.com/Tiny-Desktop-Robot-With-ESP32-and-FreeRTOS/