Add radar/index.php

This commit is contained in:
2026-01-02 21:03:24 +01:00
parent a890de5a5c
commit e47b683919

23
radar/index.php Normal file
View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ESP32 Radar</title>
</head>
<body>
<h1>Ultrasone afstand</h1>
<div id="afstand">Laden...</div>
<script>
function updateAfstand() {
fetch('afstand.txt') // leest de laatste waarde
.then(response => response.text())
.then(data => {
document.getElementById('afstand').innerText = data + " cm";
});
}
setInterval(updateAfstand, 1000); // elke seconde vernieuwen
updateAfstand();
</script>
</body>
</html>