Friday, 13 November 2020

ESP32 Simple Wifi server

I am exploring the Wifi possibilities of the ESP32 module. 

I found a sketch that enables you to switch on/off a LED via the module through an internet browser. I selected pin 2 as output, since this pin is connected to the internal blue LED of the module.

The LEDs on the ESP32 DEV module

The sketch includes the 'wifi.h' subroutine that sets up a steady wifi link to your local network.

I adapted the sketch and included two counters that shows you the number of switch on/off actions in your browser.

So now I have two-direction data traffic from the ESP32 mini wifi server to the internet browser. It works fine.

Part of the sketch:


 
This is how it looks like in the browser:







I am impressed by the Wifi capabilities of the small 3$ device.

Update 21 Nov 2020;

I added this Wifi functionality to the CO2 analyser (see also blog 4 Nov 2020).




No comments:

Post a comment