Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cm2305
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Dean Jukes
cm2305
Commits
ba83c8b2
Commit
ba83c8b2
authored
3 months ago
by
Ethan Walters
Browse files
Options
Downloads
Patches
Plain Diff
Added timeout to arduino to prevent 2 motors fighting against each other
parent
78a409cf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
physical/arduino/arduino1_motor_motionsensor/arduino1_motor_motionsensor.ino
+2
-0
2 additions, 0 deletions
...duino1_motor_motionsensor/arduino1_motor_motionsensor.ino
with
2 additions
and
0 deletions
physical/arduino/arduino1_motor_motionsensor/arduino1_motor_motionsensor.ino
+
2
−
0
View file @
ba83c8b2
...
...
@@ -33,6 +33,8 @@ void loop() {
// Ensure the angle is between 0 and 180
if
(
angle
>=
0
&&
angle
<=
180
)
{
myservo
.
write
(
angle
);
// Move servo to specified angle
delay
(
1000
);
myservo
.
detach
();
Serial
.
print
(
"Servo moved to: "
);
Serial
.
println
(
angle
);
}
else
{
...
...
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