upm/examples/java/iPressure_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

29 lines
693 B
Java

/**
* Author: Serban Waltter <serban.waltter@rinftech.com>
*/
import java.util.ArrayList;
import upm_bmp280.BMP280;
import upm_hp20x.HP20X;
import upm_ms5611.MS5611;
import upm_interfaces.*;
/**
* iPressure_Example
*/
public class iPressure_Example {
public static void main(String[] args) {
ArrayList<iPressure> sensors = new ArrayList<iPressure>();
sensors.add(new BMP280(2));
sensors.add(new HP20X(3));
sensors.add(new MS5611(4));
while (true) {
for (int i = 0; i < sensors.size(); i++) {
System.out.println("Pressure from sensor " + i + " is " + sensors.get(i).getPressure());
}
}
}
}