1
00:00:00,690 --> 00:00:07,410
Hi and welcome to a new section in this course, this section is dedicated to a mini project in its

2
00:00:07,410 --> 00:00:15,570
main project, we build these people to powered gadget that runs Micro Python to coordinate a sensor

3
00:00:15,570 --> 00:00:20,130
and OLED display with, of course, Tewes activity.

4
00:00:20,460 --> 00:00:26,970
And he will measure some environmental variables, show them on the screen, and then if certain conditions

5
00:00:26,970 --> 00:00:29,040
are met, then it will trigger.

6
00:00:29,040 --> 00:00:36,660
And if they send that email notification and you can see the full project operating right now.

7
00:00:36,930 --> 00:00:41,850
And here is what that email looks like to make this work.

8
00:00:41,880 --> 00:00:49,920
I have combined scripts from previous sections and in particular from Section 11 when we talked about

9
00:00:49,920 --> 00:00:58,390
Wi-Fi and Section nine, where we talked about displays and Section eight where we talked about sensors.

10
00:00:59,130 --> 00:01:00,210
Now, here's a catch.

11
00:01:00,210 --> 00:01:07,410
I don't just have a single version of the sketch that powers this gadget that he could see here actually

12
00:01:07,410 --> 00:01:11,430
have two different versions of the script.

13
00:01:11,730 --> 00:01:18,740
The first one is this one right here where in a single file we hold all of the code required.

14
00:01:19,110 --> 00:01:23,160
Now, the second version is taking a modular approach.

15
00:01:23,160 --> 00:01:24,770
And now I've got to file.

16
00:01:24,770 --> 00:01:26,490
I should hold the script.

17
00:01:26,730 --> 00:01:34,890
The first file is the controller covid Modula here, and it simply runs the clock and caused unnecessary

18
00:01:34,890 --> 00:01:40,620
interrupt service routine here, which then coordination orchestrates everything else that happens.

19
00:01:40,980 --> 00:01:47,270
The second file, which is the modules, is we are of course, the necessary variables, external modules,

20
00:01:47,270 --> 00:01:54,220
SAPHIR plus or the functions that do the various bits and pieces and make this gadget work.

21
00:01:54,720 --> 00:02:01,890
So by putting this together, I wanted to show you how, first of all, you can combine multiple capabilities

22
00:02:02,220 --> 00:02:09,540
that you have learned earlier in this course and create a new gadget that does something useful and

23
00:02:09,540 --> 00:02:10,800
hopefully interesting as well.

24
00:02:11,010 --> 00:02:17,160
But also as your micro python scripts are getting larger, how you'll be able to take a more modular

25
00:02:17,160 --> 00:02:23,570
approach and break down larger scripts into multiple components, multiple files.

26
00:02:23,580 --> 00:02:26,910
That is so that you can deal with the increasing complexity.

27
00:02:27,750 --> 00:02:29,360
So let's begin in the next lecture.

28
00:02:29,370 --> 00:02:34,830
I just want to do a quick overview of the hardware and the connections, and then we'll continue that

29
00:02:35,220 --> 00:02:41,630
with a more detailed dive into the first and the second versions of the script.
