Class WateringSystem
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.model.greenhouse.watering.WateringSystem
-
public class WateringSystem extends java.lang.Object
This 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 void
toggle()
Toggle the watering system: if it is on, turn it off, and vice versa.void
turnOff()
Turns the watering system off.void
turnOn()
Turns the watering system on.void
turnOnFor(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.
-
-