First look at Arduino D1 ESP8266 board

 

First Look at Arduino D1 board
Recently, I got the Arduino D1 board with ESP 8266 Wifi chip on it for about 8 USD. Instead of using ATmega 328, it’s an ESP8266-based Wi-Fi enable microprocessor. It also comes with 11 digital input/output pins, 1 analog input, micro usb connect and power jack which can be supplied with 9-24V of power input.

Board connection (CH340G)
This board use CH340G USB to UART chip for USB connection  If you find your computer cannot recognize the device when you first plug in the D1 board, please try to download and install the CH340 drive for the USB to UART connection.

CH340 USB to UART driver
https://www.wemos.cc/downloads

My Video of CH340 driver installation process
https://www.youtube.com/watch?v=oCZJbKoni6M&

The advantage of this integrated board is that it can be programmed like an Arduino, but with the ability to do some wireless data transmitting things. How fantastic it is to have such an affordable Wi-Fi board.


Because it use ESP8266 as the main microprocessor some of the Arduino codes need to be modified a little bit to fit the correct GPIO pins. I post the installation process below.

Blink at me, my ESP8266!
In order to setup the D1 board in the Arduino development IDE, we have to install some board driver from the internet.
Firstly, open the Arduino and go to Arduino>Preference.


Within the window of Preference, you can find Additional Boards Manager URL.
Copy and paste the URL provided here into it!
http://arduino.esp8266.com/stable/package_esp8266com_index.json



Select the board manager from Tools>Boards


Find and install the ESP8266 driver from it


After the installation was done, you should see the WeMos D1&R2 mini and WeMos D1(Retired) board options in it. Please choose the D1&R2 board if you got the new version of D1 board.


Now, we can try some tricks with the blinking LED light on the board of ESP8266 to test if we have done it right. Open the example of blanking from File>Examples>Blink and upload it.


If you see your D1 board start to blinking at you…
Good luck to you, my friend. You can also download the code from here:




/*

ESP8266 Blink by Simon Peter

Blink the blue LED on the ESP-01 module

This example code is in the public domain



The blue LED on the ESP-01 module is connected to GPIO1

(which is also the TXD pin; so we cannot use Serial.print() at the same time)



Note that this sketch uses LED_BUILTIN to find the pin with the internal LED

*/




void setup() {

  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output

}




// the loop function runs over and over again forever

void loop() {

  digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level

                                    // but actually the LED is on; this is because

                                    // it is acive low on the ESP-01)

  delay(1000);                      // Wait for a second

  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH

  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)

}




Comments