Added bindings for iMoisture sensors.

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Serban Waltter
2018-06-21 16:45:19 +03:00
committed by Mihai Tudor Panu
parent 2405f933de
commit 079e444fce
5 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,28 @@
/**
* Author: Serban Waltter <serban.waltter@rinftech.com>
*/
import upm_new_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());
}
}
}
}