From 737626d6e449b2ae2eb32e64b55081061660eddc Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 21 Sep 2023 14:20:13 +0200 Subject: [PATCH] start eigen serial typescript script --- tsconfig.json | 2 +- web/serial.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 web/serial.ts diff --git a/tsconfig.json b/tsconfig.json index e075f97..91776fc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2017", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ diff --git a/web/serial.ts b/web/serial.ts new file mode 100644 index 0000000..9b3e2f9 --- /dev/null +++ b/web/serial.ts @@ -0,0 +1,9 @@ +await port.open({ baudRate: 9600}); + +while (port.readible) { + + console.log("ik lees dingen") + + + +}