Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tapsterbot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rajudev
tapsterbot
Commits
e41b53f9
Commit
e41b53f9
authored
Sep 18, 2017
by
rajudev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a few test codes
parent
53b36a55
Pipeline
#874
skipped
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
servoTests.ino
software/servoTests.ino
+30
-0
standardFirmata.ino
software/standardFirmata.ino
+0
-0
No files found.
software/servoTests.ino
0 → 100644
View file @
e41b53f9
#include <Servo.h>
Servo
servo1
;
// create servo object to control a servo
Servo
servo2
;
Servo
servo3
;
// twelve servo objects can be created on most boards
int
pos
=
0
;
// variable to store the servo position
void
setup
()
{
servo1
.
attach
(
0
);
// attaches the servo on pin 9 to the servo object
servo2
.
attach
(
1
);
servo3
.
attach
(
2
);
}
void
loop
()
{
for
(
pos
=
0
;
pos
<=
35
;
pos
+=
1
)
{
// goes from 0 degrees to 180 degrees
// in steps of 1 degree
servo1
.
write
(
pos
);
servo2
.
write
(
pos
);
// tell servo to go to position in variable 'pos'
servo3
.
write
(
pos
);
delay
(
30
);
// waits 15ms for the servo to reach the position
}
for
(
pos
=
35
;
pos
>=
0
;
pos
-=
1
)
{
// goes from 180 degrees to 0 degrees
servo1
.
write
(
pos
);
// tell servo to go to position in variable 'pos'
servo2
.
write
(
pos
);
servo3
.
write
(
pos
);
delay
(
30
);
// waits 15ms for the servo to reach the position
}
}
software/standardFirmata.ino
0 → 100644
View file @
e41b53f9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment