mirror of
https://github.com/eclipse/upm.git
synced 2025-03-23 17:00:03 +03:00

This driver was developed with the DFRobot Light Sensor based on the BH1750. It has a sensitivity of .5 to 65535 Lux. It supports voltages from 3-5vdc and is connected via I2C. Signed-off-by: Jon Trulson <jtrulson@ics.com>
22 lines
400 B
OpenEdge ABL
22 lines
400 B
OpenEdge ABL
%module javaupm_bh1750
|
|
%include "../upm.i"
|
|
%include "std_string.i"
|
|
|
|
%{
|
|
#include "bh1750.hpp"
|
|
%}
|
|
|
|
%include "bh1750.hpp"
|
|
|
|
|
|
%pragma(java) jniclasscode=%{
|
|
static {
|
|
try {
|
|
System.loadLibrary("javaupm_bh1750");
|
|
} catch (UnsatisfiedLinkError e) {
|
|
System.err.println("Native code library failed to load. \n" + e);
|
|
System.exit(1);
|
|
}
|
|
}
|
|
%}
|