Dear friends,
I came across this java library at http://hirt.se/blog/?p=493 . It gives access to the sensors connected to Raspberry pi GPIO pins. Devices include DHT11, DS18B20....
The jar file is available with the library. Is it possible to include the same in B4J ( maybe by using wrapper etc...) If so I request someone to create a B4J library.
regards,
Seems to be possible with a small wrapper.
But i´m not sure if you can add .so files with a b4j library... With Android you can if they are the right ones
I do not have an raspPI, sorry. Just looked shortly above the code and the downloadable archive
There is no special problem with creating a wrapper for this library.
The so file is loaded in DHTSensor:
B4X:
static {
System.loadLibrary("dht");
}
The simplest way to solve the configuration issues is to copy the so file from the jar file to File.DirTemp or any other folder and then load it with System.load instead of loadLibrary.
System.load allows you to explicitly set the file name.
@DonManfred was not sure whether it is possible to wrap this library as it loads a native library. I answered that it is possible and explained how it can be done.
In order to wrap this library you will need some Java knowledge.
@DonManfred was not sure whether it is possible to wrap this library as it loads a native library. I answered that it is possible and explained how it can be done.
In order to wrap this library you will need some Java knowledge.