bh1750: Initial implementation
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>
This commit is contained in:
21
src/bh1750/javaupm_bh1750.i
Normal file
21
src/bh1750/javaupm_bh1750.i
Normal file
@@ -0,0 +1,21 @@
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
Reference in New Issue
Block a user