1
00:00:00,690 --> 00:00:08,340
In the previous lecture, we updated the Hurricane Katrina new grid flow to version three so that now

2
00:00:08,340 --> 00:00:14,010
we can send data from out of our own particular and store them and lock them in.

3
00:00:14,010 --> 00:00:19,920
A new Google sheet in this lecture will do a bit of testing, make sure that it works, and then do

4
00:00:19,920 --> 00:00:24,150
a quick review and plan for the next few lectures.

5
00:00:24,190 --> 00:00:25,790
The next section in particular.

6
00:00:26,670 --> 00:00:33,970
So I haven't deployed yet my new flow, so I'll do that now and make sure it works and test it out and

7
00:00:33,990 --> 00:00:34,530
deploy.

8
00:00:36,650 --> 00:00:43,910
And have a look at the dashboard, I'm going to turn on the power supply so we can get real data coming

9
00:00:43,910 --> 00:00:51,220
from the motor voltage monitor and apply power to the motor.

10
00:00:51,380 --> 00:00:59,360
OK, into the first volume came through and there's a couple of undefined, three undefined values and

11
00:00:59,550 --> 00:01:02,590
the voltages themselves seem to be working.

12
00:01:03,140 --> 00:01:07,940
Going to check out to see what's happening with the undefined values soon.

13
00:01:07,960 --> 00:01:12,220
But first, let's make sure that we can see.

14
00:01:12,230 --> 00:01:14,330
Yeah, I can see that when the motor turns on.

15
00:01:15,270 --> 00:01:19,870
It is coming through, we are getting a new rule.

16
00:01:20,190 --> 00:01:24,860
Same thing when the mountains of snow with winds of change in the state of the motel.

17
00:01:25,320 --> 00:01:26,370
We do have an update.

18
00:01:28,160 --> 00:01:28,530
Patrick.

19
00:01:29,600 --> 00:01:32,510
In other words, the update happens every one minute.

20
00:01:32,900 --> 00:01:38,400
OK, so let's figure out what is happening with these undefined values, most likely a typo.

21
00:01:38,990 --> 00:01:45,320
So in the pear shaped payload, I can see that they've got get.

22
00:01:46,340 --> 00:01:51,600
For device, name, proximity to value and pump state, these three are not coming through.

23
00:01:51,620 --> 00:01:54,110
Where's the motor voltage in the MCU?

24
00:01:54,110 --> 00:01:55,550
Voltage are coming through.

25
00:01:55,580 --> 00:01:56,030
OK.

26
00:01:56,510 --> 00:02:02,210
It looks like this is all properly set and I think the error is in here somewhere.

27
00:02:04,400 --> 00:02:12,060
We just noticed that I've got an extra parenthesis think this is what is causing the problem and yup,

28
00:02:12,080 --> 00:02:18,980
it's the copy and paste that I did actually copy the error in multiple locations, the same error in

29
00:02:18,980 --> 00:02:20,750
multiple locations in the script.

30
00:02:21,080 --> 00:02:21,560
All right.

31
00:02:22,550 --> 00:02:24,170
So let's deploy.

32
00:02:25,340 --> 00:02:29,330
The fixed code and try again.

33
00:02:29,610 --> 00:02:30,080
That's.

34
00:02:33,600 --> 00:02:34,410
Turn on the pump.

35
00:02:35,700 --> 00:02:36,320
Perfect.

36
00:02:36,400 --> 00:02:38,640
I can see that we've got a coming through.

37
00:02:40,350 --> 00:02:48,090
So we've got the time stamp, we've got the name of the client, we've got the humidity level, the

38
00:02:48,300 --> 00:02:56,070
humidity level, the state of the pump and the voltages, the if I copy my split function down, can

39
00:02:56,070 --> 00:02:57,150
see that Adara then.

40
00:02:58,150 --> 00:03:04,210
This nicely split from the original delimited string and it appears in the appropriate column.

41
00:03:05,740 --> 00:03:06,220
Perfect.

42
00:03:06,250 --> 00:03:06,700
All right.

43
00:03:06,700 --> 00:03:07,960
So let's recap.

44
00:03:07,960 --> 00:03:09,290
What do we have so far?

45
00:03:10,120 --> 00:03:18,580
We've got a year's return to note read application that allow us to control a node to control a motor

46
00:03:18,760 --> 00:03:21,360
which powers a pump manually.

47
00:03:21,760 --> 00:03:31,150
We cannot control the motor of the pump via the sensor of the humidity sense of the soil humidity sensor.

48
00:03:34,140 --> 00:03:42,000
We can also control the pump via the soil humidity sensor once it triggers itself, when the value goes

49
00:03:42,000 --> 00:03:47,340
above a certain value, then the pump goes on and off accordingly.

50
00:03:47,730 --> 00:03:52,430
And we can also measure the voltage, the power, the E.S.P 32 and the motor.

51
00:03:52,740 --> 00:03:57,210
And at the same time, everything is logged on a Google sheet.

52
00:03:59,190 --> 00:03:59,940
That's great.

53
00:03:59,970 --> 00:04:09,090
All right, so in the next iteration, what we are going to do is to make it possible for us to adjust

54
00:04:09,480 --> 00:04:14,640
via the dashboard the trigger of the motor or the trigger level of the motor.

55
00:04:14,650 --> 00:04:24,060
So instead of us having to go in the east piffling to switch to manually set the trigger and then upload

56
00:04:24,060 --> 00:04:30,900
the sketch again to the ability to will just have a widget in the dashboard that will allow us to control

57
00:04:30,900 --> 00:04:34,010
exactly what that threshold should be.

58
00:04:34,440 --> 00:04:40,380
And I think that's important because at this time, I don't really know when the pump should be triggered

59
00:04:40,380 --> 00:04:46,960
because I don't know exactly what kind of values we will be getting from the soil humidity sensor.

60
00:04:46,980 --> 00:04:52,860
We are only going to be able to know that empirically once that sensor is in the soil and we have a

61
00:04:52,860 --> 00:04:57,230
better feel of what this number should be before the pump goes on.

62
00:04:57,930 --> 00:05:02,270
So let's continue in the next lecture to make that improvement.
