Skip to content

Commit

Permalink
Get started with GitHub Pages
Browse files Browse the repository at this point in the history
Initial files to set up GitHub Pages. Based on https://github.com/witnessmenow/ESP-Web-Tools-Tutorial
  • Loading branch information
SimenZhor committed Apr 3, 2023
1 parent 67df19f commit 622061c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
27 changes: 27 additions & 0 deletions GitHubPages/ESPWebTools/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "ESP Web Tool Demo",
"new_install_prompt_erase": true,
"builds": [
{
"chipFamily": "ESP32",
"parts": [
{
"path": "boot_app0.bin",
"offset": 57344
},
{
"path": "SerialHelloWorld.ino.bin",
"offset": 65536
},
{
"path": "SerialHelloWorld.ino.bootloader.bin",
"offset": 4096
},
{
"path": "SerialHelloWorld.ino.partitions.bin",
"offset": 32768
}
]
}
]
}
38 changes: 38 additions & 0 deletions GitHubPages/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<header>Access-Control-Allow-Origin: https://domain-of-your-website.com</header>

<body>
<h1>Sample project for demoing ESP Web Tools</h1>

<div id="main" style="display: none;">

<br>
<script type="module" src="https://unpkg.com/[email protected]/dist/web/install-button.js?module"></script>

<esp-web-install-button id="installButton" manifest="ESPWebTools/manifest.json"></esp-web-install-button>
<br>
<p>NOTE: Make sure to close anything using your devices com port (e.g. Serial monitor)</p>
</div>
<div id="notSupported" style="display: none;">
<h2>Unsupported browser</h2>
<p>
Your browser does not support the Web Serial API. <br>
Try Chrome, Edge or Opera.
</p>
</div>


<script>
if (navigator.serial) {
document.getElementById("notSupported").style.display = 'none';
document.getElementById("main").style.display = 'block';
} else {
document.getElementById("notSupported").style.display = 'block';
document.getElementById("main").style.display = 'none';
}
</script>

</body>

</html>

0 comments on commit 622061c

Please sign in to comment.