Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This code serves as my starting point for any ESP8266 projects (either on Wemos, Sonoff, MagicLight, etc). In itself, this code doesn't do much, after flashing the ESP8266 will become a wifi hotspot and allow for configuration, however most of the magic happens in code you need to write on top of this.

This was written in Arduino 1.6.5 with the ESP8266 libraries installed.


  1. OTA Firmware Updates
  2. TZapu's WifiManager
  3. PubSub Client


If you've never worked with the Wemos before and are using OSX/Windows, then you'll need to download the CH340 USB->Serial driver for your OS. Google to find the appropriate driver. Most other cheap ESP8266 boards are using this chip as well, so this will probably be required if you're using the NodeMCU or other board.

Setup Arduino

Out of the box, Arduino is missing a compiler for the ESP8266, as well as some libraries which we will use later.

  1. In Arduino, under Edit -> Preferences add the following URL to the "Additional Boards Manager URLs" field:

  2. Under Tools → Board → Boards Manager search for ESP8266 and click Install

  3. In the Library Manager (Sketch → Include Library → Library Manager), search for and install the latest of:

    1. PubSubClient
    2. ArduinoJSON
    3. (Probably useful: Infrared remote libraries)
  4. Download Ken Taylor's WifiManager from and extract it to the Arduino Libraries folder

Happy Coding

With the above libraries and configuration, you should be able to upload + run this code on the ESP8266; You will need to adjust the setup() and loop() functions to actually do what you want to accomplish. Check out some of my branches which I use for various lights or sensornodes for inspiration.


No description, website, or topics provided.






No releases published


No packages published


  • Other 100.0%