WEBVTT

00:00.120 --> 00:08.010
Time for a new activity to practice with the push button so far, this activity, you can create a new

00:08.010 --> 00:09.330
project here.

00:10.720 --> 00:16.920
A new challenge will be to combine the two components that you have for now, the energy and the push

00:16.930 --> 00:25.620
button, so you will power on the energy only when the button is pressed if the button is priced you

00:25.650 --> 00:32.220
both on the energy, if the button is not priced, the power of the energy.

00:32.790 --> 00:36.380
So you will need, of course, to initialize your components here.

00:36.600 --> 00:38.920
So I advise you to start from the blank page.

00:38.940 --> 00:39.100
Okay.

00:39.150 --> 00:43.680
So you can write all the code from scratch, like here with this empty program.

00:43.920 --> 00:46.490
So you will initialize your component in the loop.

00:46.710 --> 00:47.450
You will need.

00:47.460 --> 00:51.840
So you need a if structure, just like we used previously.

00:52.350 --> 00:56.990
We need the infrastructure to check whether the button is pressed or not.

00:57.000 --> 01:04.260
And then you can decide to take an action which is lower on the energy or power of the entity.

01:04.770 --> 01:05.150
All right.

01:05.170 --> 01:08.670
And I will see you in the next lecture for the solution.
