The main logic of the engine has already been implemented and tested. What is now missing is the management of a soil moisture sensor and the management of the weather forecast.
Implementing the first feature is not so hard, once we have the value of the humidity of the soil we just need to add an IF statement to enable/disable the irrigation valves.
Implementing the second feature (weather forecast) is a bit more tricky: we need to collect the values of pressure and humidity and use them to understand if it's going to rain.
The code is ready to manage both the features in a specific function named 'evaluateTurningOnOutput' that now always returns TRUE. So when we will develop those functionalities, we will not change the engine code a part from this function.
Now let's start with the code explanation of wnw_engine.py that is a bit more complex than the sketch, so we will not follow the script line by line.
Showing posts with label source code. Show all posts
Showing posts with label source code. Show all posts
Monday, July 14, 2014
The sketch in a nut shell
The developing of the sketch has been finished few days ago and can now be considered pretty much complete, so I guess it's time for a review.
The sketch.ino file is an easy 200 lines C++ source code that is supposed to work as a slave. Main purposes are:
The sketch.ino file is an easy 200 lines C++ source code that is supposed to work as a slave. Main purposes are:
- read the current values of the sensors and provide them to the upper layer;
- read the current values of the outputs and provide them to the upper layer;
- get, from the upper layer, the expected status of the outputs and operate to address the request.
Subscribe to:
Posts (Atom)