## Want to keep learning?

This content is taken from the University of Reading's online course, Begin Robotics. Join the course to learn more.
4.20

## University of Reading

Skip to 0 minutes and 2 seconds It’s time for another exercise. This one is about getting your robot to follow a wall and then go around a maze.

Skip to 0 minutes and 13 seconds So here’s the web page. And we can see our robot as normal. And if I scroll down, we can see all the controls.

Skip to 0 minutes and 22 seconds You basically have to specify the speeds of the motors under different conditions, like when there is no wall seen, when there is a wall that you could just see on the left, or when there’s a wall that’s much closer on the left or similarly on the right, or even when a wall is being seen by both sensors. So as ever, you type in these left-right speed pairs. And you can use the reverse left motor option, if you want to. Once you’ve got the robot to follow the wall going along here and then going down, you can untick the option. And then you’ve got a maze.

Skip to 1 minute and 2 seconds And now you’ve got to define the speed so that the robot will come around here, go through the gap, and turn, go through the gaps, and so forth. I’ll show you what I mean by that. I’ve now typed in the speeds, but I’ve hidden them so you can’t see them. And I set the robot to go. And as you can see, it’s quite nicely following the wall. And then when it gets to the end, it should turn, which it does. Now it’s coming along quite happily.

Skip to 1 minute and 38 seconds And it see a gap. And it turns into it.

Skip to 1 minute and 44 seconds So you need to emulate this behaviour.

Skip to 1 minute and 51 seconds Probably find it’s best if the robots go a bit slow like this. Anyway, a little task to do. Enjoy.