O'Reilly logo

Getting Started with Cubieboard by Olliver M. Schinagl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling pins from software

There are several ways to control a GPIO from within Linux. From within the kernel through a driver or from one of the many programming languages, such as a C program or a Python script. The quickest and most basic way, however, is right from the console. This is assuming, of course, that the driver to control the GPIOs is loaded as a module or compiled into the kernel. Refer to Chapter 7, Compiling the Bootloader and Kernel Using a BSP, to recompile a kernel and to add the GPIO driver. Depending on the kernel version used, it is called the GPIO support for the sunxi platform and can be found under GPIO in the Device Drivers option. Depending on which GPIO is used, the FEX file will need to be modified to configure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required