In the previous lecture, we updated the Hurricane Katrina new grid flow to version three so that now
we can send data from out of our own particular and store them and lock them in.
A new Google sheet in this lecture will do a bit of testing, make sure that it works, and then do
a quick review and plan for the next few lectures.
The next section in particular.
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
deploy.
And have a look at the dashboard, I'm going to turn on the power supply so we can get real data coming
from the motor voltage monitor and apply power to the motor.
OK, into the first volume came through and there's a couple of undefined, three undefined values and
the voltages themselves seem to be working.
Going to check out to see what's happening with the undefined values soon.
But first, let's make sure that we can see.
Yeah, I can see that when the motor turns on.
It is coming through, we are getting a new rule.
Same thing when the mountains of snow with winds of change in the state of the motel.
We do have an update.
Patrick.
In other words, the update happens every one minute.
OK, so let's figure out what is happening with these undefined values, most likely a typo.
So in the pear shaped payload, I can see that they've got get.
For device, name, proximity to value and pump state, these three are not coming through.
Where's the motor voltage in the MCU?
Voltage are coming through.
OK.
It looks like this is all properly set and I think the error is in here somewhere.
We just noticed that I've got an extra parenthesis think this is what is causing the problem and yup,
it's the copy and paste that I did actually copy the error in multiple locations, the same error in
multiple locations in the script.
All right.
So let's deploy.
The fixed code and try again.
That's.
Turn on the pump.
Perfect.
I can see that we've got a coming through.
So we've got the time stamp, we've got the name of the client, we've got the humidity level, the
humidity level, the state of the pump and the voltages, the if I copy my split function down, can
see that Adara then.
This nicely split from the original delimited string and it appears in the appropriate column.
Perfect.
All right.
So let's recap.
What do we have so far?
We've got a year's return to note read application that allow us to control a node to control a motor
which powers a pump manually.
We cannot control the motor of the pump via the sensor of the humidity sense of the soil humidity sensor.
We can also control the pump via the soil humidity sensor once it triggers itself, when the value goes
above a certain value, then the pump goes on and off accordingly.
And we can also measure the voltage, the power, the E.S.P 32 and the motor.
And at the same time, everything is logged on a Google sheet.
That's great.
All right, so in the next iteration, what we are going to do is to make it possible for us to adjust
via the dashboard the trigger of the motor or the trigger level of the motor.
So instead of us having to go in the east piffling to switch to manually set the trigger and then upload
the sketch again to the ability to will just have a widget in the dashboard that will allow us to control
exactly what that threshold should be.
And I think that's important because at this time, I don't really know when the pump should be triggered
because I don't know exactly what kind of values we will be getting from the soil humidity sensor.
We are only going to be able to know that empirically once that sensor is in the soil and we have a
better feel of what this number should be before the pump goes on.
So let's continue in the next lecture to make that improvement.