How do I get the ESP32 back to factory after I upload a bad sketch to it?

How do I get the ESP32 back to factory after I upload a bad sketch to it?

[HiLetgo ESP32 OLED WiFi Kit ESP-32 0.96 Inch Blue OLED Display WiFi+Bluetooth CP2012 Internet Development Board for Arduino ESP8266 NodeMCU]

Hi there

I don’t know which board you have. WiFi Kit 32? can you upload a picture of that?

In ArduinoIDE what is the difference between
WiFi Kit 32
WiFi LoRa 32
WiFi LoRa 32(V2)
Wireless Stick
Wireless Stick Lite

Which one do I have, or do I have all of them?

Choose WiFi Kit 32 in Arduino IDE, and download this code into your board:

If you had installed our Heltec ESP32 library correctly, you can find it in example directly:

BTW. Here is the install manual of how to install Heltec ESP32 development framework and relative library:
https://docs.heltec.cn/#/en/user_manual/how_to_install_esp32_Arduino