Skip to main content

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

Popular posts from this blog

Arduino CNC shield control Stepper motor with DRV8825

CNC shield is quite useful for stepper motor driving. Here, I demonstrated how to use simple arduino code to drive stepper motor with DRV8825. First, just simply mount CNC shield onto Arduino Uno. Make sure the direction of the shield was right, where both the USB port and power supply wire was on your left hand site. The blue wire is my power supply which can be connect to 12-36V of power source. Next step you can mount the DRV8825 chip onto the CNC shield. Make sure the DRV8825 chip goes like this direction. If you put the chip in the wrong direction, you will probably damage it. By adjusting the jumber underneath the DRV8825 chip, motors can be driven with different kind of microstepping mode. I put three number here so it means that I set it into 1/32 step driving mode. Which is the most precise  one of DRV8825. The motor can connect to the right site of the DRV8825. Plug in the usb to your computer and upload these coded which will generate...

Connect Arduino Wemos D1 ESP8266 to Internet/Wi-Fi Router

Connect ESP8266 to Wi-Fi Router Upload these code to your Arduino WeMos D1 ESP8266 W-Fi board. #include <ESP8266WiFi.h> //SSID of your network char ssid[] = " myRouter"; //SSID of your Wi-Fi router char pass[] = " myPassWord"; //Password of your Wi-Fi router void setup() {   Serial.begin(115200);   delay(10);   // Connect to Wi-Fi network   Serial.println();   Serial.println();   Serial.print("Connecting to...");   Serial.println(ssid);   WiFi.begin(ssid, pass);   while ( WiFi.status() != WL_CONNECTED) {     delay(500);     Serial.print(".");   }   Serial.println("");   Serial.println("Wi-Fi connected successfully"); } void loop ( ) {} Using ESP8266 to connect to Wi-Fi need to use the function of: WiFi.begin(ssid, pass); // connect to target Wi-Fi SSID is the name of the Wi-Fi you want to connect to.  while ( ...

Setting up CUDA 10.0 for mxnet on Google Colaboratory

Preface Recently, I was trying to train model on Google Colaboratory with mxnet. However, I found the CUDA version pre-installed on the Colab. is 10.2. Till now, mxnet only support to CUDA 10.1 Therefore, I started to think about if it is possible to setup the environment that mxnet has support. Till now CUDA 10.1 doesn’t work for me. But I do successfully installed CUDA 10.0. Also tried to trained a LeNet on Colaboratory. Since I am a mac user, NVIDIA GPU is always what we are jealous and envy. Until I found Google Colaboratory…. I’d like to share my journey with you, if you also encounter some problem on setting up environment. Google Colaboratory provide free access to the NVIDIA Tesla K80 GPU (24GB RAM, 4992 CUDA core) . It is a great gift for most of people who is eager to learn deep learning but doesn’t have good hardware systems to train deeper models. NVIDIA Tesla K80 GPU I assume that you already have background knowledge of Python and familiar with tools like jup...