In this new activity, you are going to start from the code we have here.
So to read the ultrasonic sensor and also using the interrupt and you are going to add a new functionality
with the three entities that we have on the secret.
So basically, when you read the distance here, you are going to go on and depending on the distance
so you can, for example, alert the user if an obstacle is too close from the sensor and maybe too
close from the robot of the original.
So what you are going to do is you are going to check the distance.
And if the distance is greater than, let's say, one meter is a 100 centimeter, then you will power
the LDP or the green and all the energy on them.
Attention.
You don't have a green energy.
OK, now if the distance is between 15 and 100 centimeter, you will power on the yellow alley.
OK.
The PIN number.
OK, as a warning.
OK, if there is nothing closer than one meter, that is fine.
OK, there is no danger.
If there is something between 15 centimeters and one meter, then with the yellow LCD we get a warning
and then if the distance is lower than 15 centimeter in that case.
Red energy, all the energy that isn't been put, so in that case, we have the real obstacle that is
just in front of the robot and then we need to take some action.
So here we are just going to show an indication, OK, depending on the distance.
And this activity is actually not that complicated.
What I recommend you to do is not actually because we are going to start I'm going to start from this
program in the activity solution.
But what you can do is start from scratch and redo the entire program by yourself, try to do the entire
program to get the ultrasonic distance using the Internet and then add this functionality.
And I will see you in the next listen for the solution.