So there's the first speed and it's going second speed.
It's going as well.
Ultimately, this second speed.
Third one.
Oh, OK, I forgot to connect the fourth wire right here.
OK, sorry again.
Let me connect the wire here.
OK, let me start some relation for the last time.
Got to go clear everything, start from one.
Go to two, two is being printed, meaning that the interrupt is really working, three, it's even
faster and four, and we can see everything going back and forth forever.
Now go back to one.
Three.
To go just in whatever speed you want, then it will work.
So this is how we incorporate our interest.
Now, there is one more information.
I just want to mention the valuables that are being exchanged using the subroutine need to be declared
as volatile.
So in my case, I'm going to type volatile and same thing for this valuable voyle toy.
Why?
Because these are the valuables that are being exchanged inside my subroutine.
Another thing to consider is that always define your pins as constants so that if you have some memory
problems, it's always the pins are never going to be written over and you will never have issues with
that.
So I assume that you are jumping to some undefined memory location.
Maybe you are jumping to locations in your memory where you are not supposed to jump to, and you're
overwriting some data you don't want to ride your hardware configurations.
This is why we define them as constants so that this value will never change.
And volatile is very important when you are modifying data using your Interop subroutine.
Now we can go together and check volatile in the Arduino in the Arduino website.
You just need to type Arduino volatile and you're going to see some description.
Now, as I said, it requires some understanding of the architecture of microcontrollers a little bit
deeper than what we have studied so far.
But it's about your variable will be loaded from Iran and not from resistors because data and resistors
can be outdated and interrupts need to act immediately.
So it's very important that the values that need to be changed in Interop need to go and modify directly
from Iran and not from internal registers.
This is the basic explanation for that.
This is why whenever you have valuables that need to be modified by a subroutine interrupt subroutine,
just use volatile and all of you have been just defined them as constant and teaching you this so that
if you see some code, you get these.
Understand why are we using?