Skip to content
Snippets Groups Projects
Commit f9b196c3 authored by tomek's avatar tomek
Browse files

example 05 - clean up

parent 62562ef4
Branches
No related merge requests found
......@@ -23,7 +23,6 @@
<body>
<div id="sketch-container"></div>
<input type="range" id="dim" min="0" max="2000" value="10" /><br />
</body>
......
......@@ -66,7 +66,7 @@ async function setup() { //This runs after the function preload()
function draw() {
background(200);
text('Received: ' + receivedText, 10, 40);
text('send: ' + textToSend, 10, 50);
// check time and send value
const now = Date.now();
......@@ -76,6 +76,7 @@ function draw() {
webserial.sendSerial(new Uint8Array([value]));
index++;
lastSendTime = now;
textToSend = value;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment