HTTP Server serving a simple webpage which enables to remotely turn LED1 on/off. Compile, download, run and type 'IP_address/secret/' (don't forget the last '/') into your web browser and hit ENTER.

Fork of WebSwitch_mbed-os by Zoltan Hudak

Turn LED1, or other digital output, on/off using a web browser.

In this example we create a HTTP server that will serve a simple Web page to remotely turn LED1, or other digital output, on/off by using a web browser.

/media/uploads/hudakz/webswitch03.png/media/uploads/hudakz/webswitch_mobile01.jpg

Notice that DHCP is turned on by default. The IP address assigned to the WebSwitch server along with an instruction how to use it is printed to the connected PC's serial terminal window during program start up.
To use static IP address uncomment and adjust line #221 in main.cpp.

The project was inspired by the Tuxgraphics Web Switch. Thank you Guido!

For a Web Switch using

History

Tiny HTTP server switching LED1 (or other DigitalOut) on/off. default tip

2020-10-27, by hudakz [Tue, 27 Oct 2020 16:43:25 +0000] rev 12

Tiny HTTP server switching LED1 (or other DigitalOut) on/off.


Tiny HTTP server switching LED1 (or other DigitalOut) on/off.

2020-10-27, by hudakz [Tue, 27 Oct 2020 16:39:39 +0000] rev 11

Tiny HTTP server switching LED1 (or other DigitalOut) on/off.


Tiny HTTP server switching LED1 (or other DigitalOut pin) on/off.

2020-10-27, by hudakz [Tue, 27 Oct 2020 14:39:27 +0000] rev 10

Tiny HTTP server switching LED1 (or other DigitalOut pin) on/off.


Tiny web server controlling a DigitalOut.

2019-07-01, by hudakz [Mon, 01 Jul 2019 17:23:49 +0000] rev 9

Tiny web server controlling a DigitalOut.


Updated.

2018-10-30, by hudakz [Tue, 30 Oct 2018 16:41:15 +0000] rev 8

Updated.


Shows MAC address.

2018-01-16, by hudakz [Tue, 16 Jan 2018 08:21:04 +0000] rev 7

Shows MAC address.


Button rounded.

2017-05-09, by hudakz [Tue, 09 May 2017 06:12:22 +0000] rev 6

Button rounded.


Added sliding switch button.

2017-05-08, by hudakz [Mon, 08 May 2017 14:27:58 +0000] rev 5

Added sliding switch button.


Updated.

2017-05-06, by hudakz [Sat, 06 May 2017 14:30:48 +0000] rev 4

Updated.


Updated.

2017-05-06, by hudakz [Sat, 06 May 2017 07:43:20 +0000] rev 3

Updated.