Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
p5js Webserial to Arduino
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eLAB
Examples
p5js Webserial to Arduino
Commits
f9b196c3
Commit
f9b196c3
authored
2 years ago
by
tomek
Browse files
Options
Downloads
Patches
Plain Diff
example 05 - clean up
parent
62562ef4
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
03_ReadJson_DimLED/p5_code/index.html
+0
-1
0 additions, 1 deletion
03_ReadJson_DimLED/p5_code/index.html
03_ReadJson_DimLED/p5_code/p5_code.js
+2
-1
2 additions, 1 deletion
03_ReadJson_DimLED/p5_code/p5_code.js
with
2 additions
and
2 deletions
03_ReadJson_DimLED/p5_code/index.html
+
0
−
1
View file @
f9b196c3
...
...
@@ -23,7 +23,6 @@
<body>
<div
id=
"sketch-container"
></div>
<input
type=
"range"
id=
"dim"
min=
"0"
max=
"2000"
value=
"10"
/><br
/>
</body>
...
...
This diff is collapsed.
Click to expand it.
03_ReadJson_DimLED/p5_code/p5_code.js
+
2
−
1
View file @
f9b196c3
...
...
@@ -66,7 +66,7 @@ async function setup() { //This runs after the function preload()
function
draw
()
{
background
(
200
);
text
(
'
Received:
'
+
receivedText
,
10
,
4
0
);
text
(
'
send:
'
+
textToSend
,
10
,
5
0
);
// 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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment