Introduction
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:
- Install ESP8266 SDK following these instructions.
- 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.
- 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
- 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
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
esp-hello-world
|