IO1:
import android.os.Gpio;  // 
 
ѯ״̬ķ
µĴ뵽ҪȡGPIO״̬Ĵ
gpio_status = Gpio.readGpio('h', 9); 
 
gpio_statusķֵΪ 1 or 0
 
ֵΪ1ʱѯGPIOΪߣ֮Ϊ״̬

IO2:

try {
Gpio.writeGpio('h', 11, 0); // 3G
Thread.sleep(3000);
Gpio.writeGpio('h', 11, 1); // 3G
} catch (InterruptedException e) {
e.printStackTrace();
}

IO3:

try {
Gpio.writeGpio('h', 12, 0); // 3G
Thread.sleep(3000);
Gpio.writeGpio('h', 12, 1); // 3G
} catch (InterruptedException e) {
e.printStackTrace();
}