GithubHelp home page GithubHelp logo

esp8266-base's Introduction

ESP8266-base

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.

Features

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

Installation

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: http://arduino.esp8266.com/stable/package_esp8266com_index.json

  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 https://github.com/kentaylor/WiFiManager 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.

esp8266-base's People

Contributors

mitchese avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.