Download and install the Arduino IDE from the official web site.
1 - In your Arduino IDE, go to File> Preferences
2- Enter https://dl.espressif.com/dl/package_esp32_index.json into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button:
3- Open the Boards Manager. Go to Tools > Board > Boards Manager…
4- Search for ESP32 and press install button for the “ESP32 by Espressif Systems“:
5- That’s it. It should be installed after a few seconds.
6- In Tools > Board menu select the DOIT ESP32 DEVKIT V1 board:
7- Select the Port (if you don’t see the COM Port in your Arduino IDE, you need to install the CP210x USB to UART Bridge VCP Drivers):
8- Test your installation open the example under File > Examples > WiFi (ESP32) > WiFiScan
9- upload the code with the button . After few seconds you have to press the BOOT button on the board to complete the upload.
10- Open the Arduino IDE Serial Monitor at a baud rate of 115200. You should see the networks available near your ESP32:
In the Arduino IDE open the menu Sketch->Include Library->Manage Libraries and search the WebSockets library by Markus Sattler (see the picture below)
Select the library then click on Install button.