Back to Parent

4. Write the code for the motor, connect it to the cloud and display it as an integer variable there. Then add functionality of it into the loop. You will do this by declaring an integer for motor, setting motor as an output, setting the motor to off before the loop is read, and then activating the motor in the loop when the soil moisture sensor reads a level < 200. You will also create a variable for motor to be read in the cloud. All of this is written inline in the code below.


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0