Configuring the Wemos D1 Mini Pro ESP8266 for Arduino IDE
This guide runs you through a basic set of steps to configure the Aduino IDE to program a Wemos D1 Mini Pro ESP8266.
What is the Wemos D1 mini Pro
The Wemos D1 mini Pro is an Arduino-like board that runs using the ESP8266 microcontroller. One of the key differences to an Arduino is that because the ESP8266 has wireless capability this can natively connect to wifi.
One important difference to note is that the Wemos analogue input does not accept the same as the Arduino. The Arudinos range for analogue inputs is 0 to 5 Volts. However the Wemos analogue input will only accept 0 – 3.2 Volts.
Unlike the Arduino this uses a micro USB cable to program it which allows it to be much smaller.
Some of the features as noted on the website are:
-
11 digital input/output pins
-
Interrupt/pwm/I2C/one-wire
-
1 analog input(3.2V max input)
-
16M bytes(128M bit) Flash
-
External antenna connector
-
Built-in ceramic antenna
-
New CP2104 USB-TO-UART IC
Other than that, there are fewer pins available than the Arduino but this is a much cheaper device.
Configuring Arduino IDE for ESP8266 (Wemos D1 mini Pro)
I am going to program my Wemos using the Arduino IDE but before I do this I am going to need to set it up.
To do this I will need to install the board in the Arduino IDE so my programs can be compiled for the ESP8266. Since Arduino version 1.6.4 and later allows compiling for other microcontrollers you need a version higher than this.
Once the Arduino IDE has been opened you need to go into File -> Preferences. Once here add the following string into the box marked “Additional Boards Manager URLs”
http://arduino.esp8266.com/stable/package_esp8266com_index.json
This will allow you to install the ESP8266 board in the Arduino IDE.
Now this has been done we need to install the ESP8266 board. This can be done in the board manager, by going into Tools -> Board -> Boards Manager.
Once in the Boards Manager enter “esp8266” into the search box. This should bring up “esp8266 by ESP8266 Community”. Clicking on this will let you install the ESP8266 board which includes support for the Wemos microcontrollers.
Once this has been done you should be able to select the Wemos D1 mini Pro on the Arduino Board dropdown.
Compiling my first program for the Wemos
Once I have selected the Wemos D1 mini Pro as a board I can compile sketches for the Wemos. To initially test the Wemos I am going to use a basic sketch to write serial out. The sketch I am using to test it is reproduced below.
void setup() { Serial.begin(115200); } void loop() { Serial.println("Hello I am a Wemos D1 mini Pro"); delay(2000); }
This will just test printing some data out to the serial port. Once I have entered this I select the right COM port and press upload.
The first time you compile a sketch for the ESP8266 it will take some time. This is because it will compile all the Wemos libraries and core code. Once this has been compiled once it stores a cache of these and will be much faster to run a second time.
After running it I can see that it has printed out the message I asked it to and therefore is working.
Next time I will look at using some of the wireless capabilities.
Hello! I bought 3 wemos d1 mini pro v1.0.0. I read online that the driver needed was CP210x USB to UART. I installed the driver, restarted my pc, checked for the right architecture (x64). But I still can’t see the COMM port in my computer. Which driver did you use?? Any ideas what Im doing wrong?? The blue LED lights up when I connect it.
Hey, Are you running windows? If so go into the “Device Manager” and see if you can find any devices that don’t have a registered handler.
If that isnt working, have you tried following the instructions here: https://chewett.co.uk/blog/1049/wemos-d1-mini-not-recognised-windows-no-com-port/
The Wemos D1 Mini Pro does not appear in the boards list in the IDE. Only the Wemos D1 R1 appears in this list.
Ah, its namely slightly different, under the dropdown I can see `LOLIN(WEMOS) D1 mini Pro` does that appear for you?
the drop down wemos di r1 is the board for esp8266 d1 mini pro