-
-
Save topshed/dcb866993f384530e807fb5c253e0863 to your computer and use it in GitHub Desktop.
LEGO Spike Prime snippets for CoderDojo
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
Making a robot move |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moving your robot
Move forward for 2 seconds, then stop:
This method uses the blocks that are intended for 2 wheeled robots. Movement will start as soon as the program is run.
To move forward then turn right, then carry on, then stop:
This time the movement will not start until the left button on the top of the hub is pressed (this is useful for testing).
Another way to move forward then turn right, then carry on, then stop:
This method controls each motor separately.
Another way to move forward then turn right, then carry on, then stop:
NEXT: Detecting obstacles