added importing and exporting varaibles
This commit is contained in:
@@ -41,7 +41,6 @@ async function readLoop() {
|
||||
//Convert the array of strings to a boolean array
|
||||
//When a bit is 1 it becomes true, when a bit is 0 it becomes false
|
||||
let booleanArray = SerialArray.map(bit => bit == '1');
|
||||
|
||||
console.log(booleanArray);
|
||||
} else {
|
||||
console.error("Dit is geen Array");
|
||||
@@ -61,6 +60,7 @@ async function readLoop() {
|
||||
}
|
||||
|
||||
}
|
||||
export {booleanArray};
|
||||
|
||||
// Sluit de poort
|
||||
async function disconnect() {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
let Playerposx = 500;
|
||||
let Playerposy = 300;
|
||||
import {booleanArray} from './Serial.js';
|
||||
|
||||
if (booleanArray) {
|
||||
if (booleanArray[1]) {
|
||||
|
Reference in New Issue
Block a user