-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ernestmc/add_sleep
Added a sleep method.
- Loading branch information
Showing
5 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <dreamster.h> | ||
|
||
// Create our robot object. | ||
Dreamster robot; | ||
|
||
void setup() { | ||
// Setup our robot. | ||
robot.setup(); | ||
} | ||
|
||
void loop() { | ||
// Move forward for 3 seconds. | ||
robot.move(20, 20); | ||
robot.sleep(3000); | ||
// Now move backwards for 3 seconds. | ||
robot.move(-20, -20); | ||
robot.sleep(3000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ scan KEYWORD2 | |
read KEYWORD2 | ||
move KEYWORD2 | ||
show KEYWORD2 | ||
update KEYWORD2 | ||
setup KEYWORD2 | ||
sleep KEYWORD2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters