Class WateringSystem
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.model.greenhouse.watering.WateringSystem
-
public class WateringSystem extends java.lang.ObjectThis class represents the watering system of the greenhouse.
-
-
Constructor Summary
Constructors Constructor Description WateringSystem(com.pi4j.io.gpio.Pin pin)Constructs a new WateringSystem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtoggle()Toggle the watering system: if it is on, turn it off, and vice versa.voidturnOff()Turns the watering system off.voidturnOn()Turns the watering system on.voidturnOnFor(int milliseconds)Turns the watering system on for a certain amount of time (ms).
-
-
-
Method Detail
-
turnOn
public void turnOn()
Turns the watering system on.
-
turnOff
public void turnOff()
Turns the watering system off.
-
turnOnFor
public void turnOnFor(int milliseconds)
Turns the watering system on for a certain amount of time (ms).- Parameters:
milliseconds- The amount of time (ms) to turn the watering system on for.
-
toggle
public void toggle()
Toggle the watering system: if it is on, turn it off, and vice versa.
-
-