This is one of my first posts here. Here is a project I have been working on and pretty much finished, it uses and Espressif ESP32 microcontroller board to create a web server that displays current time, temperature, humidity and light levels.
Here's a picture of it.
The particular board is the ESP32 DOIT Devkit that I bought on Aliexpress.com. It is mounted to a RadioShack General-Purpose printed circuit board, part number 276-168B. The peripherals are a DS3231 real time clock with battery backup, a HTU21D temperature and humidity sensor, and a CDS photoresistor I bought from Electronics Goldmine part number G19038 that reads from low ohms to megaohms. The two sensors are digital and use one of the I2C bus channels on the ESP32. The LDR I have connected to a voltage divider network and a current limiting resistor and it feeds into one of the analog to digital converter input pins. That is necessary because although the ESP32 board runs of of 3.3 volts, the analog input maxes out at 1V.
Here is the main webpage a screen grab from my phone.
When you click on the link it displays like this
I also put in a page that shows the date/time that the web server was started, and another command that reboots the web server by doing a restart on the ESP32. There are some well known glitches in the DS3231 RTC whereby it can get out of sync with the microcontroller and basically locks up the I2C bus and just prints garbage. Well, I did some research on that too and have it detect the pattern of corruption in the time reading and that triggers it to reset the I2C bus and continues. It has run for days with no glitches.
The code I integrated several bits of demo code and other libraries from other users in the ESP32 community.
The 3 attachments are the board itself, the main page, and the page that displays the time, temp, etc.
Later I will upload a layout I put together and a schematic of the photoresistor network, an finally, the source code which is written using the ESP32 board type in the Arduino IDE