Want to keep learning?

This content is taken from the University of Reading's online course, Begin Robotics. Join the course to learn more.
Robot arm writing a report with a pen
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

Get a taste of this course

Find out what this course is like by previewing some of the course steps before you join: