Leon Anavi
IT Tips && Tricks

Mobile & Embedded

Created: 07.02.2015 18:01 Last Modified: 07.02.2015 19:25 Views: 8841
Keywords: C, ESP8266, Git, GitHub, Hello, make, MOD-WIFI-ESP8266-DEV, Olimex, UART

ESP8266: Hello World


ESP8266 is a low cost system on a chip that runs at 80Mhz and has a WiFi. It is an excellent and affordable solution for home automation. It his tutorial you will learn how to write your first application using C for ESP8266 and to upload it to Olimex MOD-WIFI-ESP8266-DEV.

Hello World

Perform the following four simple steps to build and run Hello World application on ESP8266:

  1. Install ESP8266 SDK following these instructions.
  2. Connect ESP8266 to a personal computer through UART cable, plug a cable from GPIO0 (aka pin 21) to GND and power on ESP8266 to boot it in flash mode.
    ESP8266, Olimex model MOD-WIFI-ESP8266-DEV, in bootloader, aka flash mode.
  3. Run the following commands on Ubuntu or another Linux distribution to get the source of Hello World from GitHub, build it and flash it to ESP8266:
    cd /opt/Espressif
    git clone https://github.com/leon-anavi/esp-hello-world.git
    cd esp-hello-world
    sudo make all ESPPORT=/dev/ttyUSB0 flash
    Flashing Hello World application on ESP8266, Olimex model MOD-WIFI-ESP8266-DEV.
  4. Once the flash procedure is complete power off ESP8266, remove the cable from GPI0 pin, run the following command in a terminal in your personal computer and power on ESP8266:
    sudo screen /dev/ttyUSB0 115200

    Running Hello World on ESP8266, Olimex model MOD-WIFI-ESP8266-DEV
    Hello World serial output from ESP8266, Olimex model MOD-WIFI-ESP8266-DEV in a terminal.

If everything is working fine you will be able to see the output "Hello World" at the terminal on your personal computer as in the screenshot below. For more details please have a look at the README file in GitHub.

See also

Getting Started with Olimex ESP8266 DEV and AT Commands
ESP8266 wiki

  Home | About | Contact | Disclaimer | Sitemap 2009-2022 Leon Anavi. All rights reserved.