Skip to content
GPIO JNI Driver for Android
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
README.md

README.md

gpio

GPIO JNI driver for Android

To use this driver will need a little work from yoru side

In theory, it should work by simply copying the directory structure to your Android app and the include the following:

import com.axoninstruments.gpio.axonI2C;

In you functions use the following to control the GPIO. Eg, these lines of code control the GPIOC24 on the Nano PC T3 Plus

axonI2C gpio = new axonI2C();

gpio.exportGPIO("88");
gpio.setdirectionGPIO("gpio88", 0);

State = gpio.readGPIO("gpio88");

You will also need to add this to your build.gradle file

externalNativeBuild {
    cmake {
        path "CMakeLists.txt"
        version "3.10.2"
    }
}

See the code for further details.

You can’t perform that action at this time.