Welcome back.
In this lesson we are going to look at the final most common use of time is which host to measure the
time between events.
So I'm back here.
Called six dot com.
We've written two articles on this very topic on this side.
So we're going to go through the articles and then we go to you vision to write a code just like we
did for the lesson on counting events using timers.
So just type cool takes and dot com in your browser.
Then when you're on the Web site go to lessons
What's that page open.
You can go to work and with time is should be down here somewhere working with time.
And then you can come to measuring time between events.
So this a very short write up on the topic.
See it's open and so yeah.
This is summary an afterthought.
There is a very exciting case study you would love this show.
Let's just give this introduction here.
What does it say.
It says this lesson is a continuation of the previous lesson count and event in that lesson.
We saw how we can count the occurrence of events by capturing the edges off on inputs.
We said the microcontroller can detect the currents of an event due to the signal changes that happen.
The input spin off the microcontroller to find the duration of an event.
All we have to.
All we have to do is save the timestamp of the horizon edge capture in one variable and saved it timestamp
of the falling edge capture in another variable and then we should trust that timestamp of the rights
and edge from the timestamp of the fallen edge finally to convert the results to our desired time units.
We have to multiply it by an appropriate value based on the run and frequency of ICP you in our time
of configuration.
We have to select capture output just in order to be able to perform this task fully in the same principle
to measure the time between two event.
We have to save the timestamp of the right and edge capture of event one i.e. input 1 and then the timestamp
of the rise and edge capture of event to find a difference between the two timestamps then.
That's the difference to the appropriate time units.
So we go to your vision and then we write the code.
So before we go and write the code there is a perfect use case for this.
And this is working with ultrasonic sense source.
I don't know whether you've used ultrasonic sensors but this is how you write drivers for ultrasonic
sensors.
You have to detect.
You have to measure the the occurence between two events.
And we'll take a look at that and we would go and right that same driver in our car you vision.
So come back to the lessons page and click over here or trust one module is on the interface and send
source.
You should click here and then we take a look at it.
So yes you can take a look at that.
But I would just continue this in the next lesson.
So see you in the next lesson here.