прям уже совсем почти последняя КОНЕЦ Света
This commit is contained in:
+18
-5
@@ -9,19 +9,32 @@
|
||||
</head>
|
||||
|
||||
<body class="stackedit">
|
||||
<div class="stackedit__html"><h1 id="значение-ножки-сейчас--">Значение ножки сейчас - <span id="wertyui"></span></h1>
|
||||
<div class="stackedit__html">
|
||||
<h1 id="значение-ножки-сейчас--">Значение потенциометра сейчас - <span id="1"></span></h1>
|
||||
<h1 id="значение-ножки-сейчас--">Значение ножки сейчас - <span id="2"></span></h1>
|
||||
</div>
|
||||
<script>
|
||||
setInterval(()=>
|
||||
fetch('/pin')
|
||||
setInterval(()=>{
|
||||
fetch('/potentiometer')
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
})
|
||||
|
||||
.then((data) => {
|
||||
document.getElementById("wertyui").innerHTML = data;
|
||||
document.getElementById("1").innerHTML = data;
|
||||
|
||||
})
|
||||
, 2000);
|
||||
|
||||
fetch('/gpu')
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
})
|
||||
|
||||
.then((data) => {
|
||||
document.getElementById("2").innerHTML = data;
|
||||
|
||||
})
|
||||
} , 200);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user