ESP32 development with AJAX web integration using the TTGO T-DISPLAY @rubin-tech
ESP32 development with AJAX web integration using the TTGO T-DISPLAY  @rubin-tech
Uploaded September 2020 | Updated September 2026, 2 weeks ago
Code posted at:
technocoma.blogspot.com/p/dht22-test-program-for-ttgo-t-display.html

Continuing from our first project with the TTGO-Tdisplay we expand upon the functionality of our project which measures temperature and humidity, but only physically at the device. In this video We will add on wireless network functionality, a webserver, Javascript and associated support code to facilitate this that it might be viewed from a web browser on a computer or smart phone.



This example will use hardcoded wifi/ssid and password for simplification, using small steps to slowly write in support, this provides a better demonstration than simply showing a finished program and talking it through.


The first goal is simply a bare bones webserver that can be hit on the network that does little but display connection success. Reading the IP info off of the terminal output to accomplish this. The first improvment is how we will be storing HTML going forward, in one concise location, this is followed by MDns support so we can use a name for the device instead of an IP.

 After this, I thought it a good Idea to leverage the display to show the network information when the device boots up so the user knows how to connect to it. Once the device connects to the network, the network info will display for five seconds and then jump to the normal programme.


At this point some global variables are created so that we can start working on passing values to the web page. A simple workup is made for the four values in simple DIV containers. Following this, some simple Javascript is used to , at an interval request this data asynchronously, and populate those containers on receive. It is then required on the back end to supply the data for those requests. A small function that builds a JSON string and pushes it is assembled.


This point in the project demonstrates a shortcoming of the webserver that comes with arduino IDE, and once demonstrated we segway to the installation of the asyncwebserver for esp32 as a replacement, then making the minor changes to accommodate it. Also I took the opportunity to remove the buttons from the interrupts due to a known hardware issue with the TTGO.

github.com/me-no-dev/AsyncTCP
github.com/me-no-dev/ESPAsyncWebServer

Now the web page is bolstered with a F/C radio button and some computation to allow for conversion. The conversion which could have been done on the esp, was moved to the browser as an exercise.

Finally to finish off we add CSS to make everything pretty.

 #esp32 #iot #arduino #maker
ESP32 development with AJAX web integration using the TTGO T-DISPLAYPentair ICHLOR 30 Salt Cell Tips and TricksMeta Quest 3 for NON-Gamers?? A review for the rest of us.Jura Impressa S / X / XS Rebuild Series Part 2 - Brew Group - Remove and RebuildBosch 800 Series Gas Stove - 1 Year ReviewGE Profile Ultrafast 2-in-1 Combo Washer Dryer Setup, Testing & In-depth Analysis: Does it deliver?Glock Teardown, Cleaning and Reassembly as Performed on a Glock 26Bambu Lab Printer Not Extruding? Do THIS First Before Replacing ItVintage Flip Clock Radio Restoration & Motor Repair MagnavoxGE Profile Ultrafast 2-in-1 Combo Washer Dryer Hidden Service ModeCommodore 64 SID music as played through a Restored Dynaco ST70 AmplifierGE Profile Ultrafast 2in1 Combo Washer Dryer - Filter Mod 6 month Evaluation
Rubintech |

ESP32 development with AJAX web integration using the TTGO T-DISPLAY

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER