Skip to content

JonarJr/JRM_mBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Team JRM:
Jonas Tjahjadi (JonarJr)
Rosalind Ellis (rosalind210)
Melanie Kaplan-Cohen (melaniekc)

Line-Following Maze Summary Report

This mBot completes the maze following a 3/4-1 inch black line. We take in the sensor input into an array of 0s and 1s of size 6, each index representing a sensor. We had to reverse the array so that it represented the sensors in the left to right order that we wanted. We created the algorithm to solve the maze by thinking of how we want the robot to turn at each possible intersection. The algorithm we ended up using is one in which the robot will to try to lurn left if possible, then continue straight if possible, and if it can't do either, it will turn right. This ensures that the robot will explore all possible paths until it finds the end of the maze, at which point the "done" boolean changes to true, stopping the motors. If the robot gets off the maze, it will rotate until it finds the line (any sensor is on), and then line correct to get back onto the line. The line correction method also gets called during straight line movement when it detects the black line on the sensors at the ends of the board instead of in the middle. We tweaked the speeds, delays, and distances of the algorithm many times in order to get the optimal maze completion. We also had to change these values because we chose to switch robots to use one that had stronger motors. We saved the presets as global variables so that the code can work on either robot.

About

GET THAT MAZE DONE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.0%
  • Other 48.0%