ESP8266 Software Resources
These are some of the better software resources and libraries I have utilised over the years to learn how to use the ESP8266 modules in my projects.
This guy and his videos was one of my first resources for learning how to use an ESP8266. The tutorials are clear and simple to follow. They also provide code templates that can be easily built upon.
He covers many topics and splits the down into manageable bit sized chunks, they are really aimed at very novice coders as he provides just enough information to get a feature up and running but doesn’t go into the detail of how the libraries he’s using work or any of the extended features that are available.
A lot of what I have done to get my projects started are based on combinations of his videos.
I still come back to his videos every now and then for a refresher and when new videos come out they are always worth a watch.
The tutorials here give you a lovely taster for each of the many topics they cover.
I have used them as a begginers course to HTML, Java, CSS and even recommended them to some of my work colleagues.
Each lesson is concise and covers a small section of the topic testing you as you progress through the lesson. They don’t go in-depth but are really useful to give you the beginnings of what’s involved in a topic such as CSS and what/why its used.
They wont get you to a standard suitable for coding a project but are usefull to allow you to understand what different languages are and why they are used.
This resource is a lot more comprehensive and I found built well on top of the SoloLearn courses I had completed.
Each course is broken down into clear topics that comprehensibly cover each aspect of the language being learnt. Again they use exercises / test along the way to ensure you have grasped the lesson.
The way these courses are set out allow them to become very usefull reference guides to revert to as your coding. I tend to have w3schools on my ipad while im coding so I can always look-up what I need.
I found these courses to be quite addictive as they are structured into small manageable chunks which challenges you to get through each.
W3schools is my go to resource whenever Im stuck or needing inspiration on a problem Im trying to resolve.
The following are free to use libraries I have utilised within my template.
Open source code means you can use these resources so long as you credit the original publisher within your code and don’t use them for commercial gain. You will find direct links and credits written into the comments of my code to do just this.
These are the core library’s that I use to setup a WiFi connection.
The web link for ESP8266WiFi.h gives a very comprehensive explanation of wi-fi access points and how to use them but the Acrobotics video gives a really good short tutorial on how to get all this up and working.
Websockets are a method of passing data between client and server. The allow for bidirectional communication with minimal delay making the passing of data between my web page and the server very robust.
This library provides methods for setting up and maintaining the data links and for extracting / sending the data in different formats.
I have to admit this one took me quite some time to resolve but once its up and running its such a simple method of throwing data across the link.
As you get more and more projects this one’s a must. Instead of remembering all the IP addresses use this lovely library to allow you or your users to type in a more understandable and memorable name.
Whatever name you give your project will now be the address of the webpage with .local after it.
So provide ‘foo’ as a name to the mDNS server and the address you type in to get t your webpage will be ‘foo.local’
This ones a must, especially if your hardware is embedded away in a project and you cant get your USB lead attached.
This allows you to update bot the firmware and the files held within SPIFFS file system in the ESP8266 over the Wi-Fi link from your browser.
There isn’t a lot about how to use this library but its so easy to use and for basic operation is set up with just the library call and the call to setup the server – job done.
When you want to update your software in the browser type the address /update and a small page will be displayed allowing you to select the files to update with and then the button to action the update to the right.
ESP8266HTTPUpdateServer httpUpdater; httpUpdater.setup(&httpServer); //Place this line in setup just before starting the main server "httpServer"
These are the standard Arduino file systems. On the ESP8266 projects I use a file system as it allows me to develop the WEB pages in separate html, json and js files with images and fonts without having to try and embed them in the code which gets very messy.
The files I’m using can be tested directly on my laptop by opening index.html in a web browser. The extra overhead and effort to include a file system and manage the files for displaying the web pages pays dividends in making the code easy to understand and more manageable.
Arduinos JSON library and the associated documentation can be found at https://arduinojson.org This library provides everything needed to manipulate JSON data.
I use JSON to format the data I want to pass between two locations. Be it the WEB server or to store settings in a file. The reason I do this is so that it can be easily read by human eye and allows for easier debugging of the web pages as I develop them. Its also fairly standard in some of the home automation systems I use.
If you want a quick description if JSON and what its used for have a look here https://www.w3schools.com/whatis/whatis_json.asp
This is the library for controlling strings of addressable RGB and RGBW LEDs. This is a very capable library and allows many different types of addressable LEDs to be controlled.
One of the biggest advantages with this library is it can be used with an ESP8266 without upsetting the WEB interface. Other librarys take over processing time and don’t allow the WEB interface to perform its critical tasks.
I use this library as I develop my code as it provides a very fast and efficient way to update the files in the SPIFFS file system. Making changes to the web page via a FTP program such as FileZia allows a lot quicker update than using the OTA or even IDE download which seems to take forever.
Its very easy to include in a project but does require the addition of two extra files in the project folder.
I do at the end of the project remove this capability as it helps the program size and reduces the different ways people could access the device.