Sensing direction

Imagine you are a store manager who would like to automatically greet the customers on their way in and out of the store. There are sensors built in the first two rows of floor tiles and you receive information. But how could you process this information and know when customers enter and when they exit the store?

The second part of the task is to read the direction in which customers move around the store from the pressure plate. We can do so by following the sequence in which the sensors are activated. When the entrance sensor activates first, followed by a sensor on the inner side of the store, this means the customer enters and vice versa. Use a piece of paper or some LEGO parts to distinguish the entrance and then do some exercise to better understand the task.

You are going to need two pressure plates for the next tasks. You can build the second one or use your classmate’s – just connect his sensor cable to your robot. Remember how and which ports you have programmed.

Sensing direction challenge

Your task is to say "Hello" to the customers who enter the store and "Goodbye" to those who leave. This is a very complicated task and the next subtasks are its step-by-step solution. If you are looking for some adventure, try to solve the task without solving the subtasks below.