Does any arduino library work for esp32 also?
Yes, many libraries do work.
Many do but some may not depending on how tied to the hardware they are.
@lonerzzz for example this one don't worked or I made a mistake: https://github.com/espressif/arduino-esp32/issues/914
This issue is closed, because it looks as if it is not a bug or problem with the ESP32 Arduino core or its support libraries. For general API usage questions or help on specific coding challenges, please visit the arduino-esp32 Gitter channel. If you feel this issue was closed in error, reopen it and comment, why you think this is a bug in the Arduino-Core.
Most helpful comment
Yes, many libraries do work.