Arduino core for ESP8266 WiFi chip

[ Arduino core for ESP8266 WiFi chip ]

This project brings support for ESP8266 chip to the Arduino environment. It lets you write sketches using familiar Arduino functions and libraries, and run them directly on ESP8266, no external microcontroller required.

ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, work with SD cards, servos, SPI and I2C peripherals.


Installing with Boards Manager

Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).

  • Install Arduino 1.6.8 from the Arduino website.
  • Start Arduino and open Preferences window.
  • Enter into Additional Board Manager URLsfield. You can add multiple URLs, separating them with commas.
  • Open Boards Manager from Tools > Board menu and install esp8266 platform (and don’t forget to select your ESP8266 board from Tools > Board menu after installation).

The best place to ask questions related to this core is ESP8266 community forum: If you find this forum or the ESP8266 Boards Manager package useful, please consider supporting it with a donation.

Available versions

Stable version

Boards manager link:


Staging version

Boards manager link:


Using git version

Linux build status

  • Install Arduino 1.6.8
  • Go to Arduino directory
  • Clone this repository into hardware/esp8266com/esp8266 directory (or clone it elsewhere and create a symlink)
cd hardware
mkdir esp8266com
cd esp8266com
git clone esp8266
  • Download binary tools (you need Python 2.7)
cd esp8266/tools
  • Restart Arduino

Using PlatformIO

PlatformIO is an open source ecosystem for IoT development with cross platform build system, library manager and full support for Espressif (ESP8266) development. It works on the popular host OS: Mac OS X, Windows, Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).

Building with make

makeEspArduino is a generic makefile for any ESP8266 Arduino project. Using make instead of the Arduino IDE makes it easier to do automated and production builds.


Documentation for latest development version:

Issues and support

If you encounter an issue, you are welcome to submit it here on Github: Please provide as much context as possible: version which you are using (you can check it in Boards Manager), your sketch code, serial output, board model, IDE settings (board selection, flash size, etc).

If you can not find the answers above, you can also try ESP8266 Community Forum


For minor fixes of code and documentation, go ahead and submit a pull request.

Check out the list of issues which are easy to fix — easy issues for 2.2.0. Working on them is a great way to move the project forward.

Larger changes (rewriting parts of existing code from scratch, adding new functions to the core, adding new libraries) should generally be discussed in the chat first.

Feature branches with lots of small commits (especially titled “oops”, “fix typo”, “forgot to add file”, etc.) should be squashed before opening a pull request. At the same time, please refrain from putting multiple unrelated changes into a single pull request.

License and credits

Arduino IDE is developed and maintained by the Arduino team. The IDE is licensed under GPL.

ESP8266 core includes an xtensa gcc toolchain, which is also under GPL.

Esptool written by Christian Klippel is licensed under GPLv2, currently maintained by Ivan Grokhotkov:

Espressif SDK included in this build is under Espressif MIT License.

ESP8266 core files are licensed under LGPL.

SPI Flash File System (SPIFFS) written by Peter Andersson is used in this project. It is distributed under MIT license.

umm_malloc memory management library written by Ralph Hempel is used in this project. It is distributed under MIT license.


$15 Intel Board for IoT-Developers

[ $15 Intel Board for IoT-developers ]



  • 8 KB Cache
  • Operating Voltage 2.0V – 3.3V
  • 32 MHz clock speed
  • Optimized power management—low battery power
  • 8 KB SRAM, 32 KB instruction flash, 8 KB OTP flash and 4 KB OTP data flash
  • Scalable Intel® Quark™ Microcontroller Sofware Interface
  • 2 channel DMA
  • Intel® System Studio for Microcontroller SDK

At $15, the Quark Microcontroller Developer Kit D2000 is perhaps the least expensive computer Intel has ever shipped.

The single-board computer has all the components mashed onto a tiny circuit board. It can be used to develop gadgets, wearables, home automation products, industrial equipment and other Internet of Things products.

Developers could also use the computer to hook up sensors for temperature, light, sound, weather and distance to devices.

The developer board is now available from Mouser Electronics. It will also be available from Avnet, according to Intel.

Intel is targeting companies developing IoT devices and the community of do-it-yourself hardware makers with the new board. These boards typically provide a cheap way to prototype electronics or to make fun devices. Intel is following Atmel, SparkFun, and other vendors that develop inexpensive boards.

This board can’t be compared to a high-powered board computer like Raspberry Pi 3, which can double as a PC. The Intel board is smaller, consumes much less power and has a much slower CPU.

Intel has shown examples of how such developer boards can be used. Its Curie board was used on snowboards at X Games to capture and provide real-time information on speed, the height of a jump, and other statistics to viewers and athletes.

Intel has been partnering with well-known products and TV shows to establish its brand recognition with makers, but the core community hasn’t warmed up to the chip maker’s products yet. Developer boards are mostly ARM-based, but the $15 board could provide Intel a breakthrough in the maker community.

The new developer board has the Quark D2000 microcontroller, which operates at a speed of 32MHz, the same frequency as the Quark chip on the button-sized Curie board.

The Intel board has a six-axis accelerometer, a magnetometer with a temperature sensor, and one USB 2.0 port. It also has a coin cell battery slot and a 5-volt power input.

The board is compatible with the hardware specifications of Arduino Uno, a popular software development tool with makers. A development kit called Intel System Studio for Microcontrollers, which is based on the Eclipse integrated development environment, is also included in the kit.


Quick Start

Tech Docs

Technical Documents

Datasheets, user guides, design guides, schematics, and more

Sample and Buy

Sample and Buy

Find everything from developer kits and samples to complete solutions from a local distributor

Getting Started on Windows*

Getting Started on Windows*

Step by step instructions to install both the software and hardware for Intel® Quark™ microcontrollers using Windows*

Getting Started on Linux*

Getting Started on Linux*

Step by step instructions to install both the software and hardware for Intel® Quark™ microcontrollers using Linux*


Intel® Quark™ Processor Software and Tools

Select the processor for which you need software and tools



Arduino as a programmable logic controller (PLC)

From the website

By on August 26, 2014

Today we’ll explain how to exploit the potential of Arduino as a programmable logic controller, connecting it to appropriate interfaces for I/O.

The PLC (Programmable Logic Controller) has been and still is the basic component of the industrial automation world. The Industrial application made the PLC systems being very expensive, both to buy and repair, and also because of the highly specific skills requested to software designers to extract the maximum potentials from controllers. Arduino is a kind of universal programmable controller, although it is only the “core” and in any case it has been built for general applications; with a little of external hardware (essentially interfaces capable of transferring signals from sensors and to actuators, reducing the EMI which may damage the microcontroller) and an appropriate software may, however, become something very similar to a PLC.

In this tutorial we will explain how to “convert” our Arduino board in a PLC-like controller, programmable through the PLC proprietary language and logic, helping those who wish to start studying this fascinating world without spending a bunch of money on materials and training.

To turn Arduino into a Programmable Logic Controller, there are two approaches. The first one is to write our program using KOP language (ladder). To do that, we must use two more applications in addition to Arduino IDE: the first is LDmicro that is the editor and compiler of our ladder code (it can be downloaded from; the second consists of a web page that will help us creating the code for the ladder.h library (; for simplicity’s sake, in this guide we’ll consider only the DIGITAL I / O with no special features. The second method is to use plcLIB (a library we suitably modified to take advantage of the IO shield coupled with Arduino UNO) so that you can edit our project code with a language similar to AWL (instructions: IF, AND, OR, …) having the control on timers and other functions; Here, too, our attention will be focused exclusively on using digital I / O without dealing with specific functions.


A practical example

As an example to understand how to take full advantage of the two methods described above, we will try to solve a problem of home automation found on the web: automate electric sunshades. Then we will proceed with a step-by-step explanation of the two methods described above. Briefly, we want to control the sunshades so that in case of a strong wind they must be automatically retracted, while unrolled only after the wind has calmed down. The behavior should be similar for the different lighting situations: roll them during the night and unroll on daylight, but obviously the wind conditions should prevail over the lighting.

As a possible solution we could use a real PLC, but given the simplicity of the algorithm and the high cost of that PLC, we will use the hardware shown above.

We will use two sensors, twilight NO (normally open) and wind NO that will be connected to the IO shield. In addition, we will have to adapt and change the power scheme of the sunshades engines so that Arduino could manage them.


Method 1: LDmicro


Before writing the ladder code (contact diagram), similar to that in figure, we need to download the LDmicro executable from the link Once downloaded and saved to your desktop, just double click on the LDmicro icon. Now, before proceeding with the application of ladder diagram, we have to write a draft of the program that we want to create.



Since the program is very simple and we use few variables only, we can use the most basic and immediate programming approach for the PLC: the wired logic. This methodology consists of simple Boolean equations that will always return as output (after the equal sign) a value that can be 0 or 1. The only operators used will be the AND (series), the OR (parallel) and NOT (negation).


Input and Output variables in our program shall be the following:














Note that the Arduino output pins have not yet been declared yet, while the “x” and “y” placed at the beginning of each variable represent respectively the input and the output. The software adds this letter automatically during the coding.

Once declared the variables, we can proceed on writing the logic equations, taking into account that Arduino with our shield reads all inputs as HIGH (1) when the contact is open and LOW (0) when the contact is closed: therefore we must negate the logic of all the inputs to ensure that they are properly executed.


Now that we have our Boolean equations, we can back to LDmicro. By pressing the “C” key or clicking on the “instruction->include contact” menu, we get the inclusion of an open contact. Now, without changing anything, by pressing “L” on keyboard (after placing the cursor after Xnew, on the right side), we should obtain a segment identical to that of figure.

Moving the cursor below Xnew (by using the arrow keys on keyboard) and pressing “C”, we will get a new segment, always named Xnew but in parallel with the previous one; now, we must click on Ynew and putting the cursor vertically on the left (before) of the output, we have to press “C” twice. By doing this we have added two more contacts, in series with the two (parallel) previous ones. To finish up, we just need to click on Ynew (but this time positioning the cursor below the output symbol) and then press “L”: so we have added another output in parallel to the existing Ynew.

Now we need to modify all contact names accordingly to those used in the equations. To do this we simply double click on the first Xnew contact we have created, then we set the name and contact type in the pop-up shell. We will assign the name “SEN_VENTO” and select “INPUT PIN” and “|/| NORMALMENTE CHIUSO” (NC). Remember that the software automatically assign the initial letter “X” or “Y” whether the variable stands for INPUT or OUTPUT, respectively.



The whole procedure shall be repeated for all the remaining contacts and equations.



To insert a new segment, click on “Edit->Insert segment behind”. After having completed the configuration, from the menu “settings” we shall select “Microcontroller->ANSI C Code”, then we can compile choosing from menu “Compile->Compile as”.

We choose to save the file on “Desktop” with these settings:

  • Save as: All Files
  • Filename: ladder.cpp

After saving the file, a popup windows will warn us to configure the I/O addresses map: we click on “OK”, save our LDmicro project (menu File->save as) always on Desktop naming it as “ladder.ld”.

Then we need one-step further. Open the ladder.cpp file with notepad, select all the text and copy paste it on the website After clicking on “Generate”, we will get a new code. Copy and paste this code to a new notepad file, saving it with the following parameters:

  • Save as: All Files
  • Filename: ladder.h


In this exercise, we have chosen to set the pin configuration as follows:

pinMode(2, INPUT);

pinMode(3, INPUT);

pinMode(4, INPUT);

pinMode(5, INPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

pinMode(10, OUTPUT);

pinMode(11, OUTPUT);

pinMode(12, OUTPUT);


Then we can modify the “ladder.h” library with this pinout setting, as shown in “Code listing 1” (the code lines highlighted in yellow are the ones to be modified, without affecting the remaining parts)

/* This is autogenerated code. */

/* (generated Wed, 13 Nov 2013 14:06:53 +0100 by ladder-gen v 1.0) */

#ifndef LADDER_H
#define LADDER_H 

#if ARDUINO >= 100
#include "Arduino.h"
#include "WProgram.h"

#define BOOL boolean
#define SWORD int 


void PlcCycle(void); 

/* Configure digital I/O according to LD (call this in setup()). */

inline void PlcSetup()
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(4, INPUT);
pinMode(5, INPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);

/* Individual pins (this code is used in ladder.cpp) */

inline extern BOOL Read_U_b_XSEN_VENTO(void)
return digitalRead(2); // TODO

inline extern BOOL Read_U_b_XIN_CREP(void)
return digitalRead(5); //TODO

inline extern BOOL Read_U_b_XFINE_COR_A(void)
return digitalRead(3); //TODO

inline BOOL Read_U_b_YL_SVO(void)
return digitalRead(11); //TODO

inline void Write_U_b_YL_SVO(BOOL v)
digitalWrite(11, v); //TODO

inline BOOL Read_U_b_YAVVOLG(void)
return digitalRead(8); //TODO

inline void Write_U_b_YAVVOLG(BOOL v)
digitalWrite(8, v); //TODO

inline BOOL Read_U_b_YL_AVV(void)
return digitalRead(9); //TODO

inline void Write_U_b_YL_AVV(BOOL v)
digitalWrite(9, v); //TODO

inline extern BOOL Read_U_b_XFINE_COR_S(void)
return digitalRead(4); //TODO

inline BOOL Read_U_b_YSVOLG(void)
return digitalRead(10); //TODO

inline void Write_U_b_YSVOLG(BOOL v)
digitalWrite(10, v); //TODO

inline BOOL Read_U_b_YL_RIP(void)
return digitalRead(12);  //TODO

inline void Write_U_b_YL_RIP(BOOL v)
digitalWrite(12, v); //TODO


Once you changed the library as just shown, we save the changes without modifying neither the name nor the file extension, keeping it always on your “Desktop”.

At this time we need to create the file “pinmap.ini”. In this file, we have to declare the names of our variables and the respective pins. This step may also be skipped but we do not guarantee proper operation of the program without.

The changes to this file are closely related to our project and must be consistent with the ladder.h code (Listing 2).

; This file contains mapping between variable name in the LD and actual
; pin number of the Arduino. 

; SEN_VENTO on pin 2

; FINE_COR_A on pin 3

; FINE_COR_S on pin 4

; IN_CREP on pin 5
IN_CREP = 5 

; AVVOLG on pin 8

; L_AVV on pin 9
L_AVV = 9 

; SVOLG on pin 10
SVOLG = 10 

; L_SVO on pin 11
L_SVO = 11 

; L_RIP on pin 12
L_RIP = 12


Now we can move our four files 1.”ladder.ld” 2.”ladder.cpp” 3.”ladder.h” 4.”pinmap.ini” to a single folder called “ladder”. Then move this folder to (W7) C: \ programmiX86 \ Arduino \ libraries (or for older editions of Windows (XP) to C: \ Program Files \ Arduino \ libraries).

Open or restart the Arduino IDE and write the following code (NOTE: it is not intended for using of timers or other special functions).

From the menu “SKETCH”, we select “import library” and choose “ladder”. Now, type the following code, which is valid for all projects similar to this:

#include <ladder.h>

void setup()




void loop()






Now, please click on the “verification check” of our code and wait until the sketch has been compiled. We should get a positive result, if not please follow again the instructions above systematically.

After the compilation is finished you can click on the icon on the side, to transfer our program to Arduino; wait until it’s loaded and … Congratulations: you’ve managed to turn your Arduino into a controller very similar to its rival PLC. Now you just have to interface your system, respecting the logic that we have established for inputs and outputs.

Attention: When you create a new project, before importing the new folder (whose name must always be “ladder” and it shall contain the files with the same name as before), you must remove from the directory the previous project folder. In case you want to keep it, just rename it and save it in another directory. If you want to restore it, simply call it “ladder” and repeat the process in reverse.

For more information and further clarifications, please connect to the site


Methodology 2: plcLIB

To follow this approach you must download the suitably modified library from our website.

The plcLIB library that we have modified to optimally interface the IO shield with Arduino UNO, is dedicated to those who want to start studying the world of automation without having to “hack” the code too.

Simply download from our website the library plcLIB and once unzipped, paste the folder in “C:\programmiX86\arduino\libraries” for Windows 7 or to “C:\ program files\arduino\libraries” for older Windows versions (XP).

Even in this case, our discussion will be mainly focused on digital logic without using special functions even if, respect to LDmicro example above, in this case we could easily take advantage of certain features such as timers.

Once you have imported our library as described above we will not have to change it, regardless of the project we are going to realize. Just edit our code taking into consideration some factors:

The digital I / Os must follow the naming shown on table.




By reusing the Boolean equations listed above, we write our code in the Arduino IDE: in this way, i.e. considering them as real equations respecting the order of operators (calculating parenthesis first and then the rest).

#include <plcLib.h> 

void setup()

void loop()






Once you have edited this code, simply click on Verify and wait for the IDE to compile the sketch: we should get a positive result, otherwise revise the instructions step-by-step. Once the compilation is complete click on “Upload” to program the Arduino. Wait until the loading is completed and CONGRATULATIONS! You have turned your Arduino to PLC.

Warning: This library has been modified and tuned by us to take advantage of the Arduino UNO digital I/O. In addition, for a new project, you should only change the code enclosed in the void loop () {…}, maintaining unchanged the previous part. You can save your sketch without changing the library: an operation very advantageous from a practical and timesaving point of view respect to the LDmicro example. With this method, you cannot use the GUI “LADDER” but you can fully exploit the logic of plc, with a considerable saving of time and reducing the risk of compilation errors or code mismatches without the need to switch to other software. In fact, a good programmer is someone who is able to create a good product regardless of the SDK or GUI he is using: the important thing is that the algorithm logic is always the same.

More information: please note that the pins mapping of our library has been modified to interface with the IO shield and Arduino UNO. The notions taken from this site are valid only if you used the original library found at the link below so that all special functions are available and explained. Our library has been adapted for the IO shield, so some features that you might find at the link below might not work properly due to the adaptation done, and then we do not guarantee the proper working of all the functions mentioned by “electronics”. However, we guarantee that the timerOn function works fine (we tested it successfully). If you wish to try all the other functions, you may download the original library and follow the step-by-step instructions from the linked website.

Here an example of the use of timers.

unsigned long TIMER0 = 0; 

void setup() {

void loop() {
timerOn(TIMER0, 2000);

Learn more and download the original library plcLIB without our changes (here is their link):

In figure, you see the wiring diagram of sensors and the motor of the sunshade (220V single-phase motor with two-way rotation versus). NOTE: Since the wiring diagram have been used for potentially hazardous voltages, we take no responsibility in case of accident, injury to persons or property resulting from a misinterpretation of the wiring diagram or by any inopportune change from your side.




To follow this example, please download a library that was suitably modified.

In this section, we deviate a little from the world of electrical engineering and automation PLCs and take a step towards electronics. We propose a second plcLIB library we suitably modified to take advantage of our IO shield so to have three digital inputs, three PWM outputs, six inputs and six analog outputs.

Unzip the file and copy the folder to the directory  “….\arduino\libraries”

Attention: If you installed the library indicated in the previous path, you have to cut and paste it into another directory to avoid conflicts with this (keep it if you want to create a purely digital project, you shall use the library specified in the methodology 2). In case you want to build a prototype that integrates both digital and analog/PWM controls, use the library indicated in this paragraph.

Table shows the mapping of inputs and outputs adapted to our IO board.



We remind you that on analog inputs, the maximum voltage and current allowed are 5V 100mA.


Here is an example application; we want to dim a led (L1; AY1) according to the value assumed by potentiometer (R1; AX1) in real time.

The Arduino solution, easily understandable after studying previous paragraph, is shown on listing:

#include <plcLib.h>

void setup()




void loop()





After verifying the code, we can upload to Arduino and…. Good job! You succeeded in interfacing the analog world with Arduino-based PLC!!

GPS Experiment With Arduino

This is the post excerpt.

[ GPS Experiment With Arduino ]

Ultimate GPS module, so we named it that. It’s got everything you want and more:


  • -165 dBm sensitivity, 10 Hz updates, 66 channels
  • 5V friendly design and only 20mA current draw
  • Breadboard friendly + two mounting holes
  • RTC battery-compatible
  • Built-in datalogging
  • PPS output on fix
  • Internal patch antenna + u.FL connector for external active antenna
  • Fix status LED

Arduino Wiring


Download the PDF of GPS Module with Arduino Wiring

Once you’ve gotten the GPS module tested with direct wiring, we can go forward and wire it up to a microcontroller. We’ll be using an Arduino but you can adapt our code to any other microcontroller that can receive TTL serial at 9600 baud. Arduino Wiring

Connect VIN to +5V, GND to Ground, RX to digital 2 and TX to digital 3.


Next up, download the Adafruit GPS library. This library does a lot of the ‘heavy lifting’ required for receiving data from GPS modules, such as reading the streaming data in a background interrupt and auto-magically parsing it. To download it, visit the GitHub repository or just click below

rename the uncompressed folder Adafruit_GPS. Check that theAdafruit_GPS folder contains Adafruit_GPS.cpp andAdafruit_GPS.h

Move Adafruit_GPS to your Arduino/Libraries folder and restart the Arduino IDE. Library installation is a frequent stumbling block…if you need assistance, our All About Arduino Libraries guide spells it out in detail!

Leonardo & Micro Users: We have special example sketches in the Adafruit_GPS library that work with the Micro/Leo!

Open up the File→Examples→Adafruit_GPS→echo sketch and upload it to the Arduino. Then open up the serial monitor. This sketch simply reads data from the software serial port (pins 2&3) and outputs that to the hardware serial port connected to USB.

Open up the Arduino IDE Serial Console and make sure to set the Serial baud rate to 115200

You can configure the GPS output you see by commenting/uncommenting lines in the setup() procedure. For example, we can ask the GPS to send different sentences, and change how often it sends data. 10 Hz (10 times a second) is the max speed, and is a lot of data. You may not be able to output “all data” at that speed because the 9600 baud rate is not fast enough.

// You can adjust which sentences to have the module emit, below

// uncomment this line to turn on RMC (recommended minimum) and GGA (fix data) including altitude


// uncomment this line to turn on only the "minimum recommended" data for high update rates!


// uncomment this line to turn on all the available data - for 9600 baud you'll want 1 Hz rate


// Set the update rate

// 1 Hz update rate


// 5 Hz update rate- for 9600 baud you'll have to set the output to RMC or RMCGGA only (see above)


// 10 Hz update rate - for 9600 baud you'll have to set the output to RMC only (see above)
In general, we find that most projects only need the RMC and GGA NMEA’s so you don’t need ALLDATA unless you have some need to know satellite locations.