upm/examples/java/iMoisture_Example.java
Serban Waltter 34bb12933d Removed old interfaces and replaced them with the new ones.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-04 22:15:13 -07:00

28 lines
623 B
Java

/**
* Author: Serban Waltter <serban.waltter@rinftech.com>
*/
import upm_interfaces.*;
import upm_moisture.*;
import upm_ims.*;
import java.util.ArrayList;
/**
* iMoisture_Example
*/
public class iMoisture_Example {
public static void main(String[] args) {
ArrayList<iMoisture> sensors = new ArrayList<iMoisture>();
sensors.add(new IMS(0));
sensors.add(new Moisture(2));
while (true) {
for (int i = 0; i < sensors.size(); i++) {
System.out.println("Moisture from sensor " + i + " is " + sensors.get(i).getMoisture());
}
}
}
}