Skip to content

Instantly share code, notes, and snippets.

@topshed
Last active April 15, 2024 15:14
Show Gist options
  • Save topshed/c21bc5a9800b7063ba5d3e946180e44f to your computer and use it in GitHub Desktop.
Save topshed/c21bc5a9800b7063ba5d3e946180e44f to your computer and use it in GitHub Desktop.
Line following
Here is one way to program a robot to follow a black line.
@topshed
Copy link
Author

topshed commented Jan 11, 2024

Line following

Tell it to always be moving forward and to the right as long as it is over a black line,
and then switch to moving forward and to the left if it is over a white surface.

Snip20240111_16

You will need to adjust the percentage values for the left and right motor motion depending on how you have built your robot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment