Return to IoT Kits

4. Prepare the Arduino IDE

You may skip this section if you have purchased a preprogrammed kit.

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 Arduino IDE tutorials online. Try this YouTube tutorial from www.opensourcehardware.com: https://www.youtube.com/watch?v=YDkdVZ7e3OY 

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

The following steps accomplish both installations. See the screenshots below for reference. Good instructions for both the IDE and ESP8266 installations can also be found at https://averagemaker.com/2018/03/wemos-d1-mini-setup.html.

  1. Download and install the Arduino Integrated Development Environment (IDE) on your PC. The latest is at www.arduino.cc/en/Main/Software.  Select “Windows Win 7 and newer” or “Mac OS X 10.10 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”. See the Preferences screenshot below for guidance.
  3. Add the ESP8266 core with the instructions in the steps below. The latest instructions are at https://github.com/esp8266/Arduino#installing-with-boards-manager
    1. See the Preferences screenshot below for reference.
    2. Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into “Additional Board Manager URLs” field. You can copy from this web page and paste it into the IDE to avoid typing errors. Close the Preferences dialog.
    3. In the IDE, open the Tools | Board | Boards Manager menu and type esp8266 into the “Filter your search…” field. Click Close when done. See the Boards Manager screenshot for guidance.
  4. From the Tools | Board menu, select LOLIN(WEMOS) D1 R2 & mini as your microprocessor. See the Tools/Board screenshot for reference.
  5. Plug in a Micro USB cable to the D1 Mini and your computer.  It should automatically install a COM port. Set menu item Tools | Port to the COM port of your D1 Mini. If your computer does not install the COM port, download the driver from https://docs.wemos.cc/en/latest/ch340_driver.html
  6. Test the IDE by running the Blink example:
    1. Open menu item File | Examples. Look in the section for ESP8266 and look for Blink. Open the Blink sketch. See the Blink Example screenshot below.
    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.

Permanent link to this article: https://w4krl.com/iot-kits/prepare-the-arduino-ide/