1
00:00:01,080 --> 00:00:07,890
Hi and welcome to a new section in this course, this section is dedicated to note read, I'm going

2
00:00:07,890 --> 00:00:12,140
to talk a little bit about what new threat is and give you some examples of its use.

3
00:00:12,140 --> 00:00:16,020
You can get a better idea of what it is that we're about to do.

4
00:00:16,830 --> 00:00:21,810
And then in the next few lectures in this section, I'll show you how to install it on your Raspberry

5
00:00:21,810 --> 00:00:30,930
Pi and explain the use of some of its most important notes and how they work inside simple flows.

6
00:00:31,410 --> 00:00:33,810
So first off, what is not red?

7
00:00:34,230 --> 00:00:36,430
So not red is a programming tool.

8
00:00:36,720 --> 00:00:41,520
Actually, it's a better way to describe it is a programming environment.

9
00:00:41,850 --> 00:00:49,970
It uses graphical flows and notes, which are the individual components in a flow to create a program.

10
00:00:50,370 --> 00:00:55,140
What I really like about note read is that it is both graphical.

11
00:00:55,140 --> 00:01:03,240
So it gives you the the visual capability of creating a program, but also it allows you a lot of functional

12
00:01:03,240 --> 00:01:09,200
control through JavaScript, which is the programming language and its underlying note.

13
00:01:09,210 --> 00:01:17,070
Read the home of note, read on the web is not red dot org, which you are looking at right here.

14
00:01:17,580 --> 00:01:20,790
And just scrolling down this page, you will see these basic features.

15
00:01:20,790 --> 00:01:25,950
So it's basically a programming environment that operates inside a browser.

16
00:01:26,760 --> 00:01:35,580
You create graphical programs which are called flows and flows are composed of nodes, which are these

17
00:01:35,910 --> 00:01:39,270
rectangular items that you see in this small screen here.

18
00:01:39,670 --> 00:01:46,230
It uses a drag and drop interface and you can assign those nodes in a variety of configurations.

19
00:01:46,230 --> 00:01:53,670
Each node does something specific or you can program make so that it does exactly the tasks that you

20
00:01:53,670 --> 00:01:54,840
wanted to do.

21
00:01:55,800 --> 00:02:03,750
Node Red comes with several built in nodes, but you can also install third party nodes, just like

22
00:02:03,750 --> 00:02:06,910
in the Adenike, install third party libraries.

23
00:02:06,930 --> 00:02:08,880
And I'm going to show you more about this in a moment.

24
00:02:10,440 --> 00:02:17,220
The name No Dread comes from the underlying technology on which it is built, which is no G.S., which

25
00:02:17,220 --> 00:02:19,290
is a JavaScript framework.

26
00:02:19,620 --> 00:02:27,600
It's a very lightweight development environment and runtime environment, which makes it excellent for

27
00:02:27,600 --> 00:02:34,770
creating applications that are supposed to be very nimble and very fast in their execution so they can

28
00:02:34,770 --> 00:02:41,610
run on low cost hardware such as the Raspberry Pi note read is open source.

29
00:02:41,610 --> 00:02:45,370
And as a result, there's a lot of people that are contributing to it.

30
00:02:45,390 --> 00:02:53,100
It's been around for a long time and it's really stable and used by hobbyists and large corporations

31
00:02:53,100 --> 00:02:53,610
alike.

32
00:02:54,630 --> 00:02:55,110
All right.

33
00:02:55,380 --> 00:03:03,120
So I'm going to show you a quick demonstration of what no, it looks like and I've got no right here

34
00:03:03,120 --> 00:03:05,400
installed on my Raspberry Pi four.

35
00:03:05,730 --> 00:03:12,720
And this is the version of the flow that makes up the brains of the terrorism controller.

36
00:03:13,260 --> 00:03:17,550
Talked about this in an earlier lecture in this course.

37
00:03:17,850 --> 00:03:21,270
But I also want to show you a few other flus that I have designed.

38
00:03:21,270 --> 00:03:28,920
And as you can see in the Web editing, the Web browser editing, you can have Flo's under tabs.

39
00:03:28,920 --> 00:03:32,710
And now all of this flows are actually deployed and are operating at the same time.

40
00:03:33,240 --> 00:03:36,780
So this one here, for example, is a 22 sensor.

41
00:03:37,170 --> 00:03:42,180
This one will just trigger the sensor every 10 seconds and get a reading.

42
00:03:43,260 --> 00:03:44,910
So here's another flow.

43
00:03:45,090 --> 00:03:46,510
It's a little bit more elaborate.

44
00:03:46,530 --> 00:03:54,870
This one uses the kitty in node to get data it subscribes to immediately topic.

45
00:03:54,870 --> 00:04:01,320
Every time that there is a new item in the queue, it will trigger this note and then the data from

46
00:04:01,320 --> 00:04:10,100
that item will be passed on to other nodes down the flow where those nodes can either be a function

47
00:04:10,110 --> 00:04:11,100
node such as this one.

48
00:04:11,100 --> 00:04:16,470
Here we got a little bit of JavaScript doing something with the data it has received, processing it,

49
00:04:16,950 --> 00:04:24,810
or in this case here you can see that we are using a Haiti to be post node, which forwards the data

50
00:04:24,810 --> 00:04:28,010
to a Iot application.

51
00:04:28,050 --> 00:04:36,540
This happens to be tweet Dode Io so that the flow can communicate with other applications elsewhere

52
00:04:36,540 --> 00:04:37,350
on the Internet.

53
00:04:38,430 --> 00:04:40,620
A few other examples here.

54
00:04:40,800 --> 00:04:43,860
We can use timestamps, you can use Web hooks.

55
00:04:44,400 --> 00:04:47,300
This is a manual trigger I can press on this button.

56
00:04:47,310 --> 00:04:51,230
You can see that it injects a particular piece of data.

57
00:04:51,240 --> 00:04:57,690
It happens to be a text message, but it can be any of those other things into the flow, which is then

58
00:04:57,810 --> 00:04:59,610
printed out by the payload.

59
00:04:59,610 --> 00:05:00,480
Serrefine.

60
00:05:01,230 --> 00:05:02,420
Expand its menu.

61
00:05:02,430 --> 00:05:10,170
Just clean this up and let's see for the current flow, only the vacations.

62
00:05:10,170 --> 00:05:14,430
And you can see there are some triggering the halloo node.

63
00:05:15,060 --> 00:05:23,380
I get the message coming out, which has been created by the debug node right here.

64
00:05:24,000 --> 00:05:28,530
So here we've got a WebSocket node so we can use WebSocket as well.

65
00:05:30,330 --> 00:05:37,920
In this example here, I've got again a manual inject node which passes a bit of data to a function

66
00:05:37,920 --> 00:05:38,370
node.

67
00:05:38,370 --> 00:05:45,290
Then this function will split the data into three components and then create three outputs in each sense,

68
00:05:45,300 --> 00:05:48,420
each component to a separate output.

69
00:05:49,260 --> 00:05:49,430
Right.

70
00:05:49,600 --> 00:05:56,640
So those will go out and you can see actually the first and the second output go both to message to

71
00:05:57,540 --> 00:05:58,290
expand.

72
00:05:59,330 --> 00:06:07,400
My sidebar here and go for current flu, let's a trigger the inject mood and you can see I had node

73
00:06:07,430 --> 00:06:16,490
one, which is message one printed out one and message to put out one and two because of this connected

74
00:06:16,490 --> 00:06:20,150
to the first and the second output of the function.

75
00:06:20,150 --> 00:06:25,130
And then we've got message three, a node message three, which prints out number three.

76
00:06:26,210 --> 00:06:26,660
Right.

77
00:06:26,690 --> 00:06:34,520
So it's just gives you an idea of what you can do here with these flows and what this look like on the

78
00:06:34,520 --> 00:06:36,270
left toolbar.

79
00:06:36,270 --> 00:06:38,720
I've got all the nodes that are available.

80
00:06:38,720 --> 00:06:43,640
Most of the notes that you can see here are built into node red.

81
00:06:43,940 --> 00:06:50,150
But a couple of them, such as, let's see the dashboard.

82
00:06:52,020 --> 00:06:59,790
Collection is a third party series, the library An, that you can install and then you can use to create

83
00:06:59,790 --> 00:07:01,240
graphical user interfaces.

84
00:07:01,830 --> 00:07:10,380
So if you go back to my terrarium and expand the sidebar, you can see here I've got the dashboard,

85
00:07:10,380 --> 00:07:18,210
which is created by the dashboard collection, and that creates the dashboard that you see here.

86
00:07:18,210 --> 00:07:20,490
That is part of the terrorism project.

87
00:07:21,360 --> 00:07:21,840
All right.

88
00:07:21,850 --> 00:07:28,980
So I hope that this gives you a good overview of what node red is and how you can use it in your projects.

89
00:07:29,310 --> 00:07:34,950
One more thing that I want to note here before we move on to the next lecture, which is the installation

90
00:07:34,950 --> 00:07:38,250
of note read on the PI is documentation.

91
00:07:38,700 --> 00:07:41,450
No read has got amazing documentation.

92
00:07:41,460 --> 00:07:45,870
If you're just starting now, I recommend you have a look at getting started.

93
00:07:45,870 --> 00:07:52,500
And then the user guide to getting started shows you how to install the application or the environment

94
00:07:52,500 --> 00:07:54,810
on a variety of computers.

95
00:07:55,290 --> 00:07:58,470
I'll be following the instructions in the Raspberry Pi box.

96
00:07:58,920 --> 00:08:03,840
And then apart from that, the user guide contains everything that you need to know in order to get

97
00:08:03,840 --> 00:08:04,500
started.

98
00:08:04,740 --> 00:08:08,460
And what are you going to be touching a few items out of this list.

99
00:08:08,790 --> 00:08:13,190
These are the items that we absolutely need for our project.

100
00:08:13,200 --> 00:08:19,710
But in order for you to have a better and a complete understanding of note read, I encourage you to

101
00:08:19,710 --> 00:08:23,520
have a look at least browse through the contents of the user guide.

102
00:08:23,970 --> 00:08:28,200
Apart from that, depending on what you want to do, you'll find tutorials and a cookbook.

103
00:08:28,200 --> 00:08:35,070
Also very useful to the cookbook, for example, tells you exactly how to do specific things I say are

104
00:08:35,700 --> 00:08:37,140
fairly comprehensive list here.

105
00:08:38,330 --> 00:08:43,430
All right, so having said all that, let's move on to the next election now where I'll show you how

106
00:08:43,430 --> 00:08:46,100
to install Node Red on the Raspberry Pi.

107
00:08:46,280 --> 00:08:54,230
Just keep in mind that the Raspberry Pi always does come with no direct already installed.

108
00:08:54,530 --> 00:09:01,250
But I prefer to just go for a fresh install so we have total control of what is running on your spraypaint.
