mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
Added bindings for iLight sensors.
Removed old interfaces C++ examples. 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
c3d5d951e1
commit
2405f933de
30
examples/java/iLight_Example.java
Normal file
30
examples/java/iLight_Example.java
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
*/
|
||||
|
||||
import upm_new_interfaces.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import upm_apds9002.*;
|
||||
import upm_bh1750.*;
|
||||
import upm_max44009.*;
|
||||
|
||||
/**
|
||||
* iLight_Example
|
||||
*/
|
||||
public class iLight_Example {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ArrayList<iLight> sensors = new ArrayList<iLight>();
|
||||
sensors.add(new APDS9002(0));
|
||||
sensors.add(new BH1750());
|
||||
sensors.add(new MAX44009(1));
|
||||
|
||||
while (true) {
|
||||
for (int i = 0; i < sensors.size(); i++) {
|
||||
System.out.println("Luminance from sensor " + i + " is " + sensors.get(i).getLuminance());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user