If you own an Arduino but haven’t bought yourself a Wemos D1 Mini yet – you should. I know a lot of these new/different boards can intimidate us average makers, but this one sits on the ‘not scary’ list.
The D1 Mini has a really simple setup and uses development environments and code languages that should be familiar to any Arduino user. I bought one back in December as yet another unnecessary purchase (my last post was about another!). I wasn’t sure what it was, but for £8 I didn’t really care (“gear whore gear whore!”).
Anyway, new board = new territory, so I had to learn how to get this thing running. Here’s how I did it…
Need a Wemos?
The older V1 board is available at Amazon.
The newer V3 is available at RasPiO (this is where I purchased mine)
If you’re not fussed about waiting a month+ for delivery, China stores like AliExpress will have plenty.
What’s a Wemos D1 Mini?
Before we start touching this thing, we should probably get to know it first. A bit like dating.
After some light research, I discovered that the Wemos D1 Mini is an Arduino compatible ESP8266(EX)-based board, busting out 11 digital input/output pins and a single analog input pin.
It offers the convenience of a micro-USB connection for both power and data (running at 3.3V), and despite its size has built-in WiFi and 4MB of flash memory.
Not bad for a couple of nuggets short of a cheeky tenner.
Setting up the Wemos D1 Mini & Arduino IDE
So the goal here is to get this thing working like an Arduino i.e. connected to your PC, showing a COM port, loaded into the Arduino IDE and running the famous blink sketch.
I’m a Windows user (Windows 10), so that’s what this guide is based on (suck it up Linux people, you know Windows is king):
Install the Drivers
For the D1 Mini, here is where you download the driver: https://wiki.wemos.cc/downloads
If you get some weird ‘install failed’ message, try clicking the ‘uninstall’ button first, then go for the install again – worked for me.
Install the Arduino IDE
I don’t have to walk you through this one – download and install the Arduino IDE if you don’t already have it: https://www.arduino.cc/en/Main/Software
Install the ESP8266 Board Manager
We’re going to add a new bunch of boards into the Arduino IDE board manager, as the Wemos isn’t in there by default.
In the Arduino IDE, go to File > Preferences. A window will pop up, and at the bottom is a field called ‘Additional Boards Manager URLs‘.
Simply copy and paste the following into that field, then press OK:
Install the ESP8266 Library
Now we need to install the library for our Wemos.
Go to Sketch > Include Library > Manage Libraries, then in the search box enter ‘ESP8266 Platform‘.
You want to install the library called ‘ESP8266 Microgear‘ (which I’ve just noticed is by someone called ‘Chavee’. I’ve been called chavvy a few times over the years)
Install the Board
Next we install the boards so that they show up in the tools menu alongside the Arduinos etc.
Go to Tools > Board > Boards Manager, then search for ‘ESP8266‘.
Install the ESP8266 option (should be the only one there):
Connect & Select the Wemos
Plug your Wemos in to a USB port on your PC (make sure it’s a proper data cable, and not some nasty power-only crapper).
Now we need to tell the Arduino IDE which board we’re using. Select Tools > Boards > WeMos D1 R2 & Mini.
You’ll notice a load of new options appear such as ‘Flash Size’, ‘CPU Frequency’, ‘Upload Speed’ etc – ignore all of these (for the Wemos D1 mini at least). All you need to do is ensure your Wemos COM port is selected:
Load the Blink Sketch
We’re going to upload the mighty ‘blink’ sketch to test that the Wemos is talking to everything properly, and is able to accept a sketch.
The Wemos D1 Mini has an on-board LED (trust me, it’s there) so no components are required here.
Load the blink sketch by selecting File > Examples > ESP8266 > Blink. The IDE window should load something like this:
Now hit the ‘Upload’ button on the Arduino IDE (circle button with a right-arrow), wait 10-seconds or so, then enjoy the magic that is the blink sketch:
There you have it folks, your Wemos D1 Mini is up and running. We’ve got it set up, talking to your PC and running a sketch.
What you do next is up to you…