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

Pulling up and pulling down

A GPIO that is configured as an input simply takes a measurement of the voltage applied to it. If it is above a certain threshold, it is considered to be high, or 1. If it is below a certain threshold, it is considered as 0. In the case of the Allwinner A series, generally speaking, everything above 2.5 volt is considered high, and everything below 0.8 volt is 0. Anything in between is undefined and could be either 0 or 1.

With that knowledge at hand, it is easy to just have a three-way switch and connect it to either the ground or the 3.3 volt. The following diagram illustrates a switch directly connected to a GPIO:

Pulling up and pulling down

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