WEBVTT

00:00.150 --> 00:07.020
In this activity, you are going to practice with interns and actually you are going to mix two functionalities

00:07.350 --> 00:10.050
interrupts and the cellular communication.

00:10.470 --> 00:16.040
So your challenge is simply to count how many times you press on the budget.

00:16.290 --> 00:22.590
So whenever you press and not when you roll is just when you press the button, it will increase a counter

00:22.590 --> 00:27.940
by one and then you will print this counter with the cell communication.

00:28.170 --> 00:36.900
So in the setup here, you will need to sit and interrupt on the button beam and interrupt will be rising

00:37.800 --> 00:43.230
because here we don't want to check when the button is released, but when the button is just pressed.

00:43.650 --> 00:47.010
So interrupt with rising in the loop.

00:47.190 --> 00:54.660
What you are going to do is you're going to check when the intercept happened, OK, and when the interruption

00:54.660 --> 00:55.120
happens.

00:55.140 --> 01:04.200
So Button pressed, you are going to increase conter plus print on sale.

01:04.950 --> 01:10.620
And note that here, if you're running from the previous lesson, you should not use cellular inside

01:10.620 --> 01:14.170
an interrupt because that's simply not working.

01:14.550 --> 01:20.580
So if you want to bring something when you trigger an interactive function, well, you first have to

01:20.580 --> 01:25.920
put a flag inside that interrupt function and then check for the flag in the look function and then

01:25.920 --> 01:26.850
print something.

01:26.890 --> 01:29.530
OK, if you tried to use to interrupt.

01:29.880 --> 01:31.170
That's not going to work.

01:31.570 --> 01:32.030
All right.

01:32.280 --> 01:38.850
So if you're not sure, but what to do is go back to the previous lessons of this section, OK, what's

01:38.850 --> 01:41.340
the best practices and warnings once again?

01:41.730 --> 01:44.460
And then and we see you in the next lesson for the solution.
