background image

OLIMEX© 2017

ESP8266 with Arduino IDE

CHAPTER 4: UPLOADING BLINKING LED

CHAPTER 4: UPLOADING BLINKING LED

We need a properly configured hardware and software setup as described previously in chapters 2 and 

3. Then we proceed as follows:

Start Arduino IDE.

Load the blinking LED example. Navigate to File → Examples → 01.Basics → Blink and click on it. 
This is shown below:

A new window with code would open. Edit the code in order to reflect the hardware of ESP8266-
EVB boards. By default, the example assumes the LED is connected to digital pin #13  (like in most

Arduino boards). In our case the relay that has a LED is connected to digital pin #5. This 
information can be acquired from the schematic of the board. Replace all occurrences of  “13” 

with “5”. The code should look as follows:

void setup() {

// initialize digital pin 5 as an output.
pinMode(5, OUTPUT);

}

// the loop function runs over and over again forever
void loop() {

digitalWrite(5, HIGH);   // turn the LED on (HIGH is the voltage level)

  

delay(1000);              // wait for a second

  

digitalWrite(5, LOW);    // turn the LED off by making the voltage LOW

  

delay(1000);              // wait for a second

}

Page 11 of 15

Summary of Contents for ESP8266-EVB

Page 1: ...H ARDUINO IDE This document applies for the following products This document applies for the following products ESP8266 EVB ESP8266 EVB BAT ESP8266 EVB BAT BOX ESP8266 EVB ESP8266 EVB BAT ESP8266 EVB...

Page 2: ...in this document are subject to continuous development and improvements All particulars of the products and their use contained in this document are given by OLIMEX in good faith However all warranti...

Page 3: ...supply adapter 5 2 1 3 USB serial cable 5 2 1 4 Personal computer 6 2 2 Software requirements 6 2 2 1 Driver for the USB serial cable 6 2 2 2 Arduino IDE 6 CHAPTER 3 SETUP 7 3 1 Hardware setup 7 3 2...

Page 4: ...dant The document structure is as follows All the required hardware and software for a basic setup is listed in CHAPTER 2 REQUIREMENTS In CHAPTER 3 SETUP there are specific details on how to set every...

Page 5: ...rs or shortening pins via wires 2 1 2 Power supply adapter 2 1 2 Power supply adapter The ESP8266 EVB board gets powered via the barrel power jack named PWR You need to apply exactly 5V DC The corresp...

Page 6: ...2 1 Driver for the USB serial cable 2 2 1 Driver for the USB serial cable Contact the supplier of your USB to serial adapter cable for such drivers After the drivers are installed make sure the cable...

Page 7: ...nterested can be found on the next page The hardest part of the connection is probably connecting the USB serial cable to the UEXT connector of ESP8266 EVB The important part here is to connect the GN...

Page 8: ...OLIMEX 2015 ESP8266 with Arduino IDE Page 8 of 15...

Page 9: ...e only thing we need to edit here is the field called Additional Boards Manager URLs In the blank space we need to provide a link to the json file which would add ESP8266 support to Arduino By the tim...

Page 10: ...m of the selector Tools Board you should see different ESP8266 boards available This is shown below At this point we have a properly configured setup Now we can proceed to upload a simple blinking LED...

Page 11: ...ESP8266 EVB boards By default the example assumes the LED is connected to digital pin 13 like in most Arduino boards In our case the relay that has a LED is connected to digital pin 5 This informatio...

Page 12: ...Arduino IDE select Generic ESP8266 Module board This is done from Tools Board Generic ESP8266 Module Edit the settings for upload Navigate to Tools and edit the settings as show below except for the C...

Page 13: ...f power to the PWR jack release the button You need to perform the above sequence every time before uploading new code to the board In Arduino IDE compile and upload the example to the board Simply cl...

Page 14: ...ed information is the official Espressif Systems forum here http bbs espressif com The best place to read more about the ESP8266 support for Arduino IDE is this one https github com esp8266 Arduino Th...

Page 15: ...le serial to USB cable with female leads BB CH340T affordable serial to USB cable remember to get female female jumper cables with it SY0605E affordable power supply adapter 5V 1A 50Hz 220V suitable f...

Reviews: