I downloaded the most current Arduino software (Version 1.6.8) from here. It is a Windows installer exe file so double clicking on it will start the installation including the installation of several peripheral drivers. You can find detailed instructions to install the Arduino software here.
Once the Arduono software is installed, I tested the install by connecting an existing Arduino Uno that I had and uploaded the Blink sketch. All systems worked as they were supposed to.
You will need to familiarize yourself with the File| Preferencesdialog box. We will need this info later.
The board can be added to the Arduino software/IDE by installing the necessary libraries. This community supported Github page: Unofficial list of 3rd party boards support has the information needed to get your Arduino software to support the board. Search/look for like “ESP8266” on this web page. Look for the URL shown in the image above. Copy and paste that URL into your Preferences dialog and select OK. Else you can copy the following and paste into your Preferences dialog and select OK:
Selected & Copy all~
http://arduino.esp8266.com/stable/package_esp8266com_index.json
https://dl.espressif.com/dl/package_esp32_index.json
https://github.com/Ameba8195/Arduino/raw/master/release/package_realtek.com_ameba_index.json
https://dan.drown.org/stm32duino/package_STM32duino_index.json
https://raw.githubusercontent.com/tenbaht/sduino/master/package_sduino_stm8_index.json
https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json
You will also need to know about the Tools | Board:… | Boards Manager dialog box. You have an older version of Arduino software if you cannot see Board Manager in the menu. Go update your software.
Open Tools | Board:|Boards Manager dialog box. Somewhere in there you will see the entry “esp8266 of ESP8266 Community version 2.1.0” 、"ESP32 1.0.4" select that. The Install button will appear, click the Install button. Wait for a while… This process will take some time to download and complete. After the install it is a good idea to shut the Arduino program and restarted it.
If not connected connect the Wemos-D1R2 board to your computer. Give it a couple of minutes to get to know the computer. Go to Control Panel| Hardware and Sound| Device Manager and click on Ports (COM & LPT). There you will find the port number that your Wemos-D1R2 is connected on. In my case it is COM12. Make a note of that, we need this info later.
Go to Tools | Board:… scroll way down and select ESP32 Wover Module. The Tools menu changes to the second image shown above.
In a Step 9 we had determined the COM port ESP32 appears on. To select the COM port, go to Tools | Port: and select the COM port, in my case it was COM3.
To select the speed of communication between the ESP32 and the computer. Go to Tools | Upload Speed: and select 921600. We are ready to upload our first sketch
Test drive the complete setup using the boiler plate sketch.
To upload the boiler plate sketch go to Sketch | Upload or use the shortcut key Crtl+U or click on the right arrow button next to the check mark. A successful compile and upload means all systems are working and we are ready to get to the real stuff.
Load the packaged example Blink. To find it go to File | Examples | 01.Basics | Blink. Compile and upload as instructed in the previous step. Nothing happens.
The reason nothing happens is because the on board LED on the UNO is connected to pin 13. Refer to the table in Step 2. On the WeMos-D1R2 the on board LED is connected to pin X.