servo motor and potonceometr project
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Welcome file</title>
|
||||
<link rel="stylesheet" href="https://stackedit.io/style.css" />
|
||||
</head>
|
||||
|
||||
<body class="stackedit">
|
||||
<div class="stackedit__html"><h1 id="считывание-данных">Считывание данных</h1>
|
||||
<h3 id="значение-ножки">Значение ножки</h3>
|
||||
<p id="pin">123</p>
|
||||
<h3 id="потенциометр">Потенциометр</h3>
|
||||
<p id="pot">123</p>
|
||||
</div>
|
||||
<script>
|
||||
setInterval(() => {
|
||||
Promise.all([
|
||||
fetch('/pin').then((response) => response.json()),
|
||||
fetch('/potonciometer').then((response) => response.json())
|
||||
]).then(([pin, pot]) => {
|
||||
document.getElementById('pin').innerHTML = pin + '\n'
|
||||
document.getElementById('pot').innerHTML = pot;
|
||||
})
|
||||
}, 300);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user