Skip main navigation

Robot program

How does a robot follow commands? Or how does a robot obey instructions? In this article, Professor Richard Mitchell explains more.
Robot arm writing a report with a pen
© University of Reading

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….

© University of Reading
This article is from the free online

Begin Robotics

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now