Demystifying The ESP8266 With A Series Of Tutorials

If your interest has been piqued by the inexpensive wireless-enabled goodness of the ESP8266 microcontroller, but you have been intimidated by the slightly Wild-West nature of the ecosystem that surrounds it, help is at hand. [Alexander] is creating a series of ESP8266 tutorials designed to demystify the component and lead even the most timid would-be developer to a successful first piece of code.

If you cast your mind back to 2014 when the ESP8266 first emerged, it caused great excitement but had almost no information surrounding it. You could buy it on a selection of modules, but there were no English instructions and no tools to speak of. A community of software and hardware hackers set to work, resulting in a variety of routes into development including the required add-ons to use the ever-popular Arduino framework. Four years later we have a mature and reliable platform, with a selection of higher-quality and well supported boards to choose from alongside that original selection.

The tutorials cover the Arduino and the ESP, as well as Lua and the official SDK. They are written for a complete newcomer, but the style is accessible enough that anyone requiring a quick intro to each platform should be able to gain something.

Our community never ceases to amaze us with the quality of the work that emerges from it. We’ve seen plenty of very high quality projects over the years, and it’s especially pleasing to see someone such as [Alexander] giving something back in this way. We look forward to future installments in this series, and you should keep an eye out for them.

28 thoughts on “Demystifying The ESP8266 With A Series Of Tutorials

  1. This is a welcome addition, but I have to say, I didn’t find the ESP8266 to be particularly mystifying. I used an Adafruit board with the Arduino toolset a couple of years ago and it was as straightforward as using a standard Arduino.

    1. For beginners, it can certainly be mystifying. Perhaps not so much for more experienced people, but there are a lot of people who are complete beginners with microcontrollers, and I constantly see people who have already used Arduinos for a while still being confused about the idea that you can actually run your code on the ESP8266 itself instead of using it as just a peripheral with Arduinos.

      “Mystifying” as a word-choice in and of itself may be somewhat…mystifying, too, but I think it gets the point across well enough.

    2. The esp SPI port setup is fairly complex, as is handling the flash memory to ram swapping that some people don’t clearly understand in FreeRTOS. The Arduino IDE hides most of these advanced chip features, and offers a simplified subset of functionality.

      Personally, I found the ESP32 dual-core simply had more ram+flash available, and most importantly could do more than the single SSL link on the esp8266. A real problem is a lack of clear module labels giving people buggy rev0 silicon, or older single core variants.

    3. I’m a fairly experienced guy, but I must disagree. When this thing came onto the scene, it was really muddy. There are many different formats and modules, with different voltages, and different numbers of IO pins,etc. It seems you can program it using a Lua approach, but the Arduino platform works, too. It’s just a giant tossed salad of info, and it’d be nice to have some unified sorting of that info. It’s not to say you can’t work through the jumble–I did–but it would be a whole lot easier if you didn’t have to.

  2. I started my own path in DIY-electronics with the ESP8266 a year and a half back, myself; I had never even so much as blinked an LED before, let alone programmer a microcontroller, so it was quite a challenge at first, especially with the not-so-good tutorials and stuff. I did learn the basics, then how SPI, I2C etc. work at the wire-level, eventually I learned how to directly mess with registers to do stuff, like set up SPI or drive GPIO-pins without touching Arduino-functions and all that, but I sure would have gotten to speed much faster with a good set of guides.

    1. I can only think of maturity of software-support for it and the ESP8266 can fit in a slightly smaller space than an ESP32, apparently. The ESP32 is better at everything else.

        1. Well, no. The ESP32 has better power-management, including being able to put the higher-performance cores to sleep, but keeping the tiny microcore running, which can do data-logging into RAM or interact with I2C-devices and stuff — the ESP8266 would have to wake up to do any of those. The microcore consumes mere microamps of power while running, so it’s definitely the more power-friendly choice.

    2. Technology always takes time get mass spread and available. ESP-32 has been around for what, almost two years now?. but at the same time ESP8266 is a very mature and powerful product, so it is to expect that ESP8266 is the “way to go” for at least a couple years.
      I am just now starting to see some commercial products coming with ESP-12 on it (I live in Brazil), so I expect the ESP8266 to live long years yet.

        1. ESP-12 and such refer to modules with the ESP8266-microcontroller, various supporting caps, SPI Flash etc. on it under an RF-shield; it’s not a microcontroller in and of itself.

  3. Really glad to hear you are liking the tutorials! Stay tuned — the projects are going to ramp up in difficulty. Yes, using the Arduino environment is very easy with the ESP8266. This is why I am putting so much more time into the SDK. This gives you full power over the module. I am writing libraries from scratch, etc, to show how it all works.

    Stay tuned for more!

        1. Does micropython use up a lot of the microcontroller’s memory? I was interested in it for a while on the ESP32 but it doesn’t seem to handle bluetooth (one of the main reasons for using an ESP32), but C/C++ seems to work fine (ArduinoIDE or ESP-IDF).

  4. Am I the only one who still uses the AT commands and nothing else? For all my projects I’ve always needed a dedicated micro and use the 8266 as a slave, gating it’s power so I can completely shut it off when I need to be low power. Been too lazy to learn anything orher than bare metal C.

    1. You’re not the only one. Still, it seems kinda perverse given the immense work that the community has done in getting the ESP8266 useable as a freestanding device. :)

      My standard get-stuff-done-quick platform is a STM32F103 cheapo board tethered over serial to an ESP8266 running the AT firmware or esp-link. I’m just really used to the chip’s peripherals.

      That said, I really need to dig into the ESP32 again.

    2. It was cool learning how to use the ESP8266’s AT instruction set, but given the amount of computing power in the ESP, the many choices of programming environments, and the availability of so many great libraries with detailed examples, especially from the Arduino port… I think it’s well worth the effort to exploit the capabilities of the ESP8266 rather than just using it as a wifi modem with another micro. Lower parts count if nothing else…

  5. One thing many forget is the fact that for a lot a newcomers, it is not just the ESP issue, it is also the Ethernet issues and protocols..
    I have an ESP which i like to make it first Access point, then select it from my phone wifi, then set an address where the data will go, and so on …..
    As you can see it is a complicated process. You can teach us newby about using ESP, but it is a lot more behind it.
    Do you have a link for somebody which never used ESP and all the communication protocols to understand better ?

    1. There’s TONS of good info about the ESP8266 out there, so there’s really no excuse for not digging into it. Google and try a few. The Arduino port to ESP8266 is very easy to use, and there’s many libraries available.

      For your requirement, here’s a link to a tutorial using a library that does exactly that.(as well as some of the setup etc)

      https://randomnerdtutorials.com/wifimanager-with-esp8266-autoconnect-custom-parameter-and-manage-your-ssid-and-password/

  6. Some of the code is worse than bad, and also just plain wrong. Arduino avr may have missing sprintf, but esp Arduino has Serial.printf… To be honest, I was extremely underwhelmed. On other matters, doing one.off simple stuff isn’t too taxing, but doing “proper” work with multiple sensors and a live web interface, say, is a LOT trickier. The “coderz R us” style I saw is going to make life a nightmare for anyone trying to learn more than just toy one.trick.pony solutions.

Leave a Reply to WereCatfCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.