Last active
April 15, 2024 15:14
-
-
Save topshed/8483daa0ab4643dc24e3246cc8d6e3ec 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Detecting obstacles
Add a distance sensor to the front of your robot.


When the left button is pressed, the bot will start moving forward.
If it detects an obstacle closer than 10cm, it will stop.
NEXT: Detecting colours