Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.
Robot arm
Robot arm

Robot program

Suppose a robot has a computer. Then that computer will have a series of instructions which it will obey. Ultimately those instructions are a series of electronic signals which computers but not humans, understand.

Instead we can describe what the program should do in a language more like English.

For instance, suppose we want the robot to continually explore its environment without bumping into obstacles, where it has sensors for detecting if there is an obstacle on the left or the right. This could be achieved by the robot repeatedly obeying the following:

  • Read Information From Sensors
  • IF neither sensor sees an obstacle Go Forward
  • IF left sensor only sees an obstacle Turn to the Right
  • IF right sensor only sees an obstacle Turn to the Left
  • IF both sensors see an obstacle Go Back

This leads us to the first exercise for the week. Here there is a robot in an environment with sensors which detect objects or walls on the left and the right. Your task is to determine what the motor speeds should be to Go Forward, Turn to the Right, etc….

Share this article:

This article is from the free online course:

Begin Robotics

University of Reading

Contact FutureLearn for Support