Return to IoT Kits

3. Prepare the Arduino IDE

The Arduino IDE is an easy-to-use C++ compiler specially adapted to programming Arduino-compatible microcontrollers. You do not actually need to know how to program because all the IoT Kits software is ready-to-run. The IDE will upload the IoT Kits firmware to the microcontroller used in the kits.

There are many tutorials online. Try this YouTube tutorial from 

After installing the IDE you must install the ESP8266 core that enables the microcontroller used in the kits to understand the Arduino code.

  1. Download and install the Arduino Integrated Development Environment (IDE) on your PC. The latest version is 1.8.10 at  Select “Windows Installer, for Windows XP and up” or “Mac OS X 10.8 Mountain Lion or newer”. You can make a contribution if you wish or you can select “Just download”.
  2. Start the Arduino IDE and open File | Preferences. Check “Display Line Numbers” and “Enable Code Folding”.
  3. Add the ESP8266 core with the instructions in steps 1 & 2 below. For reference see and watch this video: this one:
    1. Enter into “Additional Board Manager URLs” field. You can copy from this web page and paste into the IDE to avoid typing errors. Close the Preferences dialog.
    2. In the IDE, open the Tools | Board | Boards Manager menu and install esp8266 by ESP8266 Community. You can find it quickly by typing esp8266 into the “Filter your search…” field. Click Close when done.
  4. From the Tools | Board menu, select LOLIN(WEMOS) D1 R2 & mini as your microprocessor.
  5. Plug in a Micro USB cable to the D1 Mini and your computer.  It should install a COM port. Set menu item Tools | Port to the COM port of your D1 Mini.
  6. Test the IDE by running the Blink example:
    1. Open menu item File | Examples. Look in the section “Examples for WeMos D1 R2 and mini” Find ESP8266 then Blink. Open the Blink sketch.
    2. Upload the sketch to your D1 Mini by clicking the Upload button or Control + U.
    3. The LED on the D1 Mini will flash every two seconds.
  7. Add the following libraries to the IDE using instructions at
    1. BME280 by Tyler Glenn – use Sketch | Include Library | Manage Libraries… Search for BME280
    2. ThingSpeak by MathWorks – use Sketch | Include Library | Manage Libraries… Search for ThingSpeak
    3. BH1750 – download from Install with Sketch | Include Library | Add .ZIP Library…