Category Archives: ESP 8266

ESP 8266 – ESP-12E Hello World – Blinking LED

We are using Arduino IDE to program our ESP8266. Please see this article regarding how to setup the Arduino IDE for programming ESP8266.

Here is a blinking LED code for ESP8266 written in Arduino IDE.

#define ESP8266_LED 5 
void setup() 
{   
   pinMode(ESP8266_LED, OUTPUT); 
} 
void loop() 
{   
   digitalWrite(ESP8266_LED, HIGH);   
   delay(500);   
   digitalWrite(ESP8266_LED, LOW);   
   delay(500); 
}

Instructions:

  • Connect a LED (with a resistor in series) to an I/O pin of your ESP8266. Change the pin number to an appropriate one in the first line of the code.
  • Select the appropriate ESP Board/Version fromthe Boards Menu of the Arduino IDE. If your board is not listed then you can select Generic and then set the parameters according to the chip or module version (ESP-01, ESP-06, ESP-12E etc) you are using.
  • Upload the code to the module.
  • The LED should be blinking now.

 

UBLOX NEO 6M GPS Module

The NEO 6M from Ublox is a good and affordable GPS module. The characteristics are as follows.

It can be purchased with a ceramic antenna from online stores like Ebay or Aliexpress. Unfortunately the one I purchased had a problem with the Antenna connection due to which some time got wasted in trying to get a fix. After a little bit of tweaking with the antenna connector the module is getting a GPS fix even inside rooms.

I have supplied it with 5v and the RX and TX also has been connected to 5v I/O. There is an indicator (light) on the module that flashes when the module gets a GPS fix. (Please check with your module manufacturer for the correct voltage of the module)

Ublox provides a software called “u-center” for testing the module. But the software is good enough for monitoring also.  The u-center software can also be used to change/update configurations of the module. The software can be downloaded from this Ublox website’s link https://www.u-blox.com/en/product/u-center-windows . And as a backup it has been put up here also (at the time of writing this article the latest version was 8.21).

Ublox u-center software

The module can be connected using a USB to Serial module (PL2303 or CH340G) or using an Arduino. Below is the connection details for connecting through Arduino or USB to RS232 modules.

Connect to PC using Arduino 
Arduino                NEO 6M 
   RX         ----       RX
   TX         ----       TX
   5v         ----       5v
   GND        ----       GND

Connect to PC using USB to Serial Module
USB to RS232             NEO 6M 
 RX              ----       TX
 TX              ----       RX
 5v              ----       5v
 GND             ----       GND

 

The module works out of the box and no further configuration is required. It might take a while to get a fix.

Here is the datasheet.

The module outputs data in NMEA format. The details of the format can be found here. Here is a copy of the website material in case the site ever goes down (the data is of http://gpsinformation.org)

Please check with your module manufacturer for the correct voltage of the module

Notes:

  • Once the module somehow stopped working and responding. Removing the onboard battery helped. Re-attaching the battery later on didn’t have any problem and the module is working fine. The battery is for data backup, so removing it altogether doesn’t have any problem, just that it takes a lot of time to get a fix when the module is powered up again.