For our second project, the movement of the flower will be dependent on the reading taken by an LDR, but will be underpinned the reading taken by a moisture sensor. This means that the flower will open as the intensity of light in it’s environment increases; unless the moisture level in the soil is lower than a given value. in which case nothing will happen. Here is our code:
This code makes use of an if else statement, with our code for LDR input/servo output running if the moisture level is sufficient, and returning to the top of the loop if not. Still waiting on our moisture sensor to arrive, we are unsure about the value for moisture at which the code for the servo movement will run, so we shall conduct an experiment to find out the optimum value when we have access to the sensor.
Our finished kinetic design is now in the queue to be 3D printed. As shown in the image above, the pivots will be printed as part of the base and are attached to the centre of each leaf. Alligned vertically from each pivot is a loop for which fishing wire may be attached, as this is what will connect our servo motor to each component.