An arstechnica.com article published today outlined Google's latest progress towards their IoT platform, Android Things (formerly Project Brillo). It looks like it supports the Pi 3.

Is it possible to access the Pi's GPIO pins from a native Android application? Can you provide a brief example?

1 Answer 1


You can access the GPIO pins using the new Peripheral I/O API.

Example for turning BCM6 pin to HIGH:

PeripheralManagerService pioService = new PeripheralManagerService();
Gpio pin = pioService.openGpio("BCM6");
// turn on.
// turn off.

Make sure to check the pinout for the Raspberry Pi 3 on the official doc or on pinout.xyz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.