Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Android Things Quick Start Guide

You're reading from  Android Things Quick Start Guide

Product type Book
Published in Aug 2018
Publisher Packt
ISBN-13 9781789341799
Pages 192 pages
Edition 1st Edition
Languages
Author (1):
Raul Portales Raul Portales
Profile icon Raul Portales

Using GPIO for input

Now that we have seen how to use GPIO for output, let's move on to input. In this section we will look at accessing Button and ButtonDriver without using the meta driver of the Rainbow HAT. Both drivers are a layer of abstraction over GPIO, so our next step will be to learn how to work with GPIO directly. Finally, we will look at a few sensors that generate a GPIO signal and how to use them.

Buttons

Buttons are quite simple to deal with when using the driver or the input driver, but they can also be used to learn how to use GPIO output at a low level.

Let's get into the button driver.

Button driver...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}