This commit is contained in:
sam
2023-10-31 13:35:44 +01:00
parent c06dbff39b
commit 76ab9ac30e

View File

@@ -10,21 +10,16 @@ let xArray = [];
let tempArray = [];
let humidArray = [];
let lichtArray = [];
let humid = 0;
let licht = 0;
let TempAdvies;
let HumidAdvies;
let LichtAdvies;
let VolledigAdvies;
let Soort;
let Waardes;
let TempWaardes;
let LuchtVochtigsheidWaardes;
let LichtWaardes;
const between = (x, min, max) => {
return x >= min && x <= max;
};
const updatehtml = (div, variable)
// Request a port and open a connection.
async function connect() {
//vraag aan de browser om een serial port te selecteren
@@ -71,8 +66,6 @@ async function readLoop() {
humidArray.push(SensorValues[1])
lichtArray.push(SensorValues[2])
}
buffer = [];
@@ -88,10 +81,7 @@ async function readLoop() {
plotly(humidGraph, humidArray)
plotly(lightGraph, lichtArray)
Advies(SensorValues[0], SensorValues[1], SensorValues[2])
AdviesUpdate()
AdviesUpdate()
}
// Show the received data in the console
@@ -103,7 +93,6 @@ async function readLoop() {
break;
}
}
}
}