Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Things Quick Start Guide

You're reading from   Android Things Quick Start Guide Build your own smart devices using the Android Things platform

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789341799
Length 192 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Raul Portales Raul Portales
Author Profile Icon Raul Portales
Raul Portales
Arrow right icon
View More author details
Toc

Revisiting Rainbow HAT components

Following the same approach as for GPIO and PWM, we are going to start by removing the Rainbow HAT meta driver from our dependencies and using the specific drivers of the components directly. This time the components are the alphanumeric display and the temperature and pressure sensor.

Alphanumeric display (Ht16k33)

The driver for the alphanumeric display is called driver-ht16k33, so we just need to add it to our build.gradle:

dependencies {
[...]
implementation 'com.google.android.things.contrib:driver-ht16k33:+'
}

The only difference with the code we used before is that we now have to construct an object of type AlphanumericDisplay passing the I2C bus name, which we can initialize...

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 €18.99/month. Cancel anytime