After finishing writing the sketch, compile and download the code to the ESP32 by clicking on the  button on the…