Linking an ESP32 to a 5V source requires caution regarding amperage . While the ESP32 operates at 3.3V, employing a 1k resistor can help you to securely interface with 5V outputs. This method https://compoden.com/collections/robotics-motion