Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Urumbu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Neil Gershenfeld
Urumbu
Commits
1a37adb6
Commit
1a37adb6
authored
3 years ago
by
Quentin Bolsee
Browse files
Options
Downloads
Patches
Plain Diff
improved comments
parent
ad1067e3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
serialservo/serialservo.ino
+2
-1
2 additions, 1 deletion
serialservo/serialservo.ino
serialstep/serialstep.ino
+3
-2
3 additions, 2 deletions
serialstep/serialstep.ino
with
5 additions
and
3 deletions
serialservo/serialservo.ino
+
2
−
1
View file @
1a37adb6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
// serial servo PWM
// serial servo PWM
//
//
// Neil Gershenfeld 7/28/21
// Neil Gershenfeld 7/28/21
// Quentin Bolsee
7/
12/
20
21 : add button
// Quentin Bolsee 12/
7/
21 : add button
//
//
// This work may be reproduced, modified, distributed,
// This work may be reproduced, modified, distributed,
// performed, and displayed for any purpose, but must
// performed, and displayed for any purpose, but must
...
@@ -34,6 +34,7 @@ void loop() {
...
@@ -34,6 +34,7 @@ void loop() {
if
(
SerialUSB
.
available
())
{
if
(
SerialUSB
.
available
())
{
SerialUSB
.
readBytes
((
char
*
)
&
duration
,
2
);
SerialUSB
.
readBytes
((
char
*
)
&
duration
,
2
);
if
(
duration
==
65535L
)
{
if
(
duration
==
65535L
)
{
// special command, reply with button value
int
btn
=
digitalRead
(
BUTTON
);
int
btn
=
digitalRead
(
BUTTON
);
SerialUSB
.
write
(
btn
?
'1'
:
'0'
);
SerialUSB
.
write
(
btn
?
'1'
:
'0'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
serialstep/serialstep.ino
+
3
−
2
View file @
1a37adb6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
// serial step-and-direction
// serial step-and-direction
//
//
// Neil Gershenfeld 4/11/21
// Neil Gershenfeld 4/11/21
// Quentin Bolsee
7/
12/
20
21 : add button
// Quentin Bolsee 12/
7/
21 : add button
//
//
// This work may be reproduced, modified, distributed,
// This work may be reproduced, modified, distributed,
// performed, and displayed for any purpose, but must
// performed, and displayed for any purpose, but must
...
@@ -82,6 +82,7 @@ void loop() {
...
@@ -82,6 +82,7 @@ void loop() {
digitalWrite
(
STEP
,
LOW
);
digitalWrite
(
STEP
,
LOW
);
}
}
else
if
(
c
==
'?'
)
{
else
if
(
c
==
'?'
)
{
// reply with button value
int
btn
=
digitalRead
(
BUTTON
);
int
btn
=
digitalRead
(
BUTTON
);
SerialUSB
.
write
(
btn
?
'1'
:
'0'
);
SerialUSB
.
write
(
btn
?
'1'
:
'0'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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