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

Dependencies:   UIPEthernet

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 the mbed board, on/off by using a web browser. An inexpensive ENC28J60 Ethernet module is used to assure connection between the mbed board and the Ethernet network (Internet). The ENC28J60 Ethernet module is driven by the UIPEthernet library.

Needed parts:

  • mbed board
  • ENC28J60 Ethernet module
  • Wires
  • Web browser (Internet Explorer, Safari, Firefox, Chrome ...) running on Windows, Mac, Linux, iPhone or Android device.
/media/uploads/hudakz/webswitch_enc.jpg/media/uploads/hudakz/webswitch_mobile01.jpg

Notice that DHCP is turned on by default. If you prefer to use static IP address then uncomment line 234

The IP address assigned to the WebSwitch server along with an instruction how to use it is printed in the connected PC's serial terminal window during program start up.

Warning

Please notice that the 3.3V power supply chip (RT8183-B) installed on an STM32F103C8T6 board is not rated to power also the ENC28J60 board.


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

NOTE:

History

HTTP Server serving a simple webpage which enables to remotely turn a digital ouput on/off. default tip

2020-07-23, by hudakz [Thu, 23 Jul 2020 15:32:33 +0000] rev 17

HTTP Server serving a simple webpage which enables to remotely turn a digital ouput on/off.


Tiny HTTP server to remotely turn a DigitalOut on/off.

2020-06-05, by hudakz [Fri, 05 Jun 2020 15:23:09 +0000] rev 16

Tiny HTTP server to remotely turn a DigitalOut on/off.


Tiny HTTP server to remotely turn a DigitalOut on/off.

2020-06-05, by hudakz [Fri, 05 Jun 2020 15:15:01 +0000] rev 15

Tiny HTTP server to remotely turn a DigitalOut on/off.


Updated.

2019-09-07, by hudakz [Sat, 07 Sep 2019 17:53:02 +0000] rev 14

Updated.


Updated to use the latest version of UIPEthernet library.

2019-09-03, by hudakz [Tue, 03 Sep 2019 09:34:17 +0000] rev 13

Updated to use the latest version of UIPEthernet library.


Updated.

2019-08-30, by hudakz [Fri, 30 Aug 2019 08:23:46 +0000] rev 12

Updated.


Updated to use the latest UIPEthernet library.

2019-08-27, by hudakz [Tue, 27 Aug 2019 22:10:13 +0000] rev 11

Updated to use the latest UIPEthernet library.


Mbed OS 5 enabled.

2019-08-27, by hudakz [Tue, 27 Aug 2019 15:03:19 +0000] rev 10

Mbed OS 5 enabled.


Updated.

2019-02-05, by hudakz [Tue, 05 Feb 2019 14:15:05 +0000] rev 9

Updated.


Updated.

2017-06-30, by hudakz [Fri, 30 Jun 2017 20:07:32 +0000] rev 8

Updated.