mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
Added bindings for iMotion and iPressure 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:

committed by
Mihai Tudor Panu

parent
079e444fce
commit
2f0ae1cc49
29
examples/java/iPressure_Example.java
Normal file
29
examples/java/iPressure_Example.java
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 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_new_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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user