{"id":20669147,"url":"https://github.com/erikdelange/wipy-2.0-web-interface","last_synced_at":"2026-04-22T06:06:43.906Z","repository":{"id":129085256,"uuid":"77620494","full_name":"erikdelange/WiPy-2.0-Web-Interface","owner":"erikdelange","description":"Web Interface to control the LED and user button on WiPy Expansion Board 2.0","archived":false,"fork":false,"pushed_at":"2022-01-15T11:54:57.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T16:14:44.711Z","etag":null,"topics":["html","micropython","python","webpage","wipy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikdelange.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-29T15:12:54.000Z","updated_at":"2022-01-15T11:55:00.000Z","dependencies_parsed_at":"2023-04-03T15:49:14.137Z","dependency_job_id":null,"html_url":"https://github.com/erikdelange/WiPy-2.0-Web-Interface","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erikdelange/WiPy-2.0-Web-Interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikdelange%2FWiPy-2.0-Web-Interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikdelange%2FWiPy-2.0-Web-Interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikdelange%2FWiPy-2.0-Web-Interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikdelange%2FWiPy-2.0-Web-Interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikdelange","download_url":"https://codeload.github.com/erikdelange/WiPy-2.0-Web-Interface/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikdelange%2FWiPy-2.0-Web-Interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32123605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","micropython","python","webpage","wipy"],"created_at":"2024-11-16T20:13:10.451Z","updated_at":"2026-04-22T06:06:43.889Z","avatar_url":"https://github.com/erikdelange.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WiPy-2.0-Web-Interface\r\nWeb Interface to control the LED and user button on WiPy Expansion Board 2.0\r\n\r\n### Summary\r\nThe WiPy expansion board contains a user controllable led and a push-button. By using the WiPy's wireless capabilities it is easy to create a web interface to switch the led on and off, and read the status of the button. This example shows how to setup such an interface.\r\n\r\n### HTML\r\nThe HTML code is based on the Bootstrap 3 framework. With just a few extra commands Bootstrap provides you with a pretty interface which scales nicely with the device you are using. The key elements to look for in the HTML code are the two buttons to switch the led on and off, and the table to hold the status of the WiPy's button (plus for demonstration purposes one additional pin).\r\n\r\n### Code\r\nThe server waits for an HTTP request. Only the first line of the request is kept and the rest - the header fields - is discarded. If any parameters were passed they will be in the request line, preceded by a question mark. For example, this is the request after pressing the LED Off button.\r\n```\r\nGET /?LED=Off HTTP/1.1\r\n```\r\nAny parameter present is decoded by the server, and then a fresh webpage with the WiPy's current button status is returned. So, switching a led on or off implicitly refreshes the webpage. When this must be done on a regular basis - for example when you want to monitor constantly changing inputs - then uncomment the following line in the HTML.\r\n```html\r\n\u003cmeta http-equiv=\"refresh\" content=\"30\"\u003e\r\n```\r\nThis will make the page refresh itself every thirty seconds.\r\n\r\nNote that this is not particularly efficient. Another approach can be found [here](https://github.com/erikdelange/WiPy-2.0-Web-Interface-using-JavaScript).\r\n\r\nThe resulting web page looks like this.\r\n\r\n![ui.png](https://github.com/erikdelange/WiPy-2.0-Web-Interface/blob/master/ui.png)\r\n\r\n### Sources\r\nThis example combines elements from the following code snippets which can be found in the MicroPython documentation.\r\n\r\n* \u003chttps://github.com/micropython/micropython/blob/master/examples/network/http_server.py\u003e\r\n* \u003chttps://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_tcp.html\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikdelange%2Fwipy-2.0-web-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikdelange%2Fwipy-2.0-web-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikdelange%2Fwipy-2.0-web-interface/lists"}