1
00:00:00,390 --> 00:00:07,440
Hey, in this section, we are going to make modifications to the flu and to the Isbister to sketch,

2
00:00:07,680 --> 00:00:15,840
so that is possible to set the desired threshold via the dashboard instead of hitting it hard wired

3
00:00:15,840 --> 00:00:20,900
or hard coded in the inspectorate to sketch, as we are doing so far.

4
00:00:21,300 --> 00:00:28,140
So I'm going to quickly show you what the end result of our modifications is going to be in the dashboard

5
00:00:28,140 --> 00:00:29,310
itself and how it works.

6
00:00:29,760 --> 00:00:36,810
So what you're looking at is the next version of the dashboard of the output of the node red flow.

7
00:00:36,810 --> 00:00:44,130
And you can see I've got a new group here with the widget that allows us to set the pump threshold by

8
00:00:44,130 --> 00:00:46,350
default to offset it to be 500.

9
00:00:46,380 --> 00:00:53,790
That's a real value that's coming from that 10 bit analog input that is connected to the soil humidity

10
00:00:53,790 --> 00:00:57,990
sensor or in this case, to the consumer that is simulating the sensor.

11
00:00:58,590 --> 00:01:00,120
And it works.

12
00:01:00,840 --> 00:01:06,030
Just going to turn on the power supply and you can see just works.

13
00:01:06,460 --> 00:01:08,140
We tested this previously as well.

14
00:01:09,360 --> 00:01:12,300
So no change to this functionality.

15
00:01:12,300 --> 00:01:17,390
But let's say that I'd like to change the threshold to make it safe.

16
00:01:17,400 --> 00:01:20,730
550 got a new threshold set.

17
00:01:21,150 --> 00:01:29,300
And let's see how the controller reacts when you slowly increase the raw humidity value to go to a bit

18
00:01:29,340 --> 00:01:41,490
over 500, 514 is still turned off a bit more, 539 still off, a bit over 550.

19
00:01:41,490 --> 00:01:43,290
And the motor is now on.

20
00:01:48,570 --> 00:01:57,270
And as long as the needle shows that less than five hundred and fifty the nearest face off, so that's

21
00:01:57,270 --> 00:02:04,290
what we're going to do, we're going to implement the functionality for the widget that allow us to

22
00:02:04,290 --> 00:02:07,640
set the pump threshold value.

23
00:02:08,040 --> 00:02:12,390
And that also requires a small modification in the ISP to sketch.

24
00:02:13,200 --> 00:02:20,490
Let's begin with the code red flow, because this is the component of the controller that drives this

25
00:02:20,490 --> 00:02:21,510
new functionality.
