Skip to content

Instantly share code, notes, and snippets.

@marians
Last active October 22, 2016 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marians/64cf7e6f79056e4b86bf8dd97255fc7e to your computer and use it in GitHub Desktop.
Save marians/64cf7e6f79056e4b86bf8dd97255fc7e to your computer and use it in GitHub Desktop.

Getting Started with a D1 mini (ESP-8266EX) and Arduino

These notes from June 2016 document how I got a successful start with a Wemos D1 mini on Arduino (Mac).

Installation

USB Serial Connection

I'm on Mac OS Sierra, so I need a driver for the USB serial bridge on the board, which is a CH340. The driver can be downloaded from this page:

https://blog.sengotta.net/signed-mac-os-driver-for-winchiphead-ch340-serial-bridge/

After unzipping, an installer can be executed, which unfortunately requires a restart of the computer.

Adding boards, libraries and examples to Arduino

The ESP8266 has provided libraries for the Arduino IDE. To install them, an additional repository URL has to be added to Arduino.

In the Arduino IDE, open Arduino > Settings and paste this URL in the input field Additional Boardmanager URLs:

http://arduino.esp8266.com/versions/2.2.0/package_esp8266com_index.json

Now open the menu item Tools > Boardmanager. Enter esp8266 in the search field and select the item esp8266 by ESP8266 Community.

Select the Board in Arduino

Open the Tools > Board Menu and select WeMos D1 R2 & mini.

Select the USB port

Connect your D1 mini to an USB port of your Mac.

In the Tools > Port menu you should see one entry like /dev/cu.wchusbserialfd120, which you select.

A simple test

Open the EPS8266 specific blink example sketch via the menu File > Examples > ESP8266 > Blink.

Hit the Upload button in Arduino and watch the console. In case you see errors, try setting the upload speed to a lower value via the Tools > Upload Speed menu, then try Uploading again.

In the case of success, the blue LED on the D1 mini should start blinking fast during the upload. Then, when done, the actual program will be executed, which lets the LED blink in a slow and steady rhythm.

The next best thing is to try out some of the networking examples. It shouldn't take more than configuring your Wifi network's SSID and password in the Arduino sketch code to get a working connection.

Have fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment