基本信息
源码名称:Android Things Quick Start Guide.pdf
源码大小:20.25M
文件格式:.pdf
开发语言:Java
更新时间:2020-10-26
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 4 元 
   源码介绍
This book will give you a quick start on Android Things, the platform for IoT made by
Google and based on Android. We will go through the basics of IoT and smart devices,
interact with a few components that are commonly used on IoT devices, and learn the
protocols that work underneath, using examples and a hands-on approach.
We take our hands-on learning approach by going straight into playing with hardware
using the Rainbow HAT, so we don't need to do any wiring. We then dig through layer
after layer to understand what is being used underneath, but only after we have seen them
working. If you are curious about more in-depth learning (such as writing your own
drivers), you can always go into the next layer, because almost all the code referenced in
this book is open source.

Table of Contents
Preface 1
Chapter 1: Introducing Android Things 8
Technical requirements 8
What is Android Things? 9
Internet of Things (IoT) vs. smart devices 10
Android Things vs. other platforms 10
Emulators and testing 11
Android Studio 12
Design concepts behind Android Things 13
Displays are optional 13
Home activity support 14
Permissions 14
Android Things Console 15
Supported APIs 16
Hardware you will need 16
Android Things developer kits 17
Raspberry Pi 17
NXP Pico iMX7D 18
Rainbow HAT 20
Components, circuits, and so on 21
Wires and breadboards 23
Setting up a developer kit 24
Installing Android Things 24
Configuring Wi-Fi using the script 27
Configuring Wi-Fi using the system UI 28
Connecting to your Android Things 30
Creating an Android Things project 32
Manifest 35
Gradle configuration 36
Activity code 37
Summary 38
Chapter 2: The Rainbow HAT 39
Technical requirements 40
Android Things architecture 41
Peripheral lifecycle 41
User space drivers 42
LEDs 42
The Arduino way 43
Table of Contents
[ ii ]
Threads 45
Coroutines 46
Using Handler and Runnable 48
Using Timer and Timertask 49
Buttons 51
Button driver 51
Debouncing 52
Button input drivers 53
Piezo buzzer 55
Alphanumeric display (Ht16k33) 57
Temperature and pressure sensor (Bmx280) 58
Direct read 58
Continuous updates with sensor driver 61
Adding pressure driver 63
LED strip (Apa102) 64
Summary 67
Chapter 3: GPIO - Digital Input/Output 70
Technical requirements 71
Making the code work on any developer kit 71
Using GPIO for output 73
LEDs 73
Relays 76
Using GPIO for input 78
Buttons 78
Button driver 78
Input drivers 80
Controlling buttons directly with GPIO 80
Other sensors 81
Other usages of GPIO 84
DC motor controller (L298N) 84
Stepper motor (28BYJ-48) with controller (ULN2003) 87
Ultrasonic distance sensor (HC-SR04) 89
LCD display (TM1637) 92
Summary 94
Chapter 4: PWM - Buzzers, Servos, and Analog Output 95
Technical requirements 96
PWM overview 96
Piezo buzzers 98
Servos 100
Using the servo driver 101
Tweaking the servo configuration 106
PWM as analog output 107
Summary 110
Table of Contents
[ iii ]
Chapter 5: I2C - Communicating with Other Circuits 111
Technical requirements 111
Overview of I2C 112
Addressing circuits 113
Revisiting Rainbow HAT components 115
Alphanumeric display (Ht16k33) 115
Temperature and pressure sensor (Bmx280) 115
Extension components 116
Analog to digital converter (ADC) – PCF8591 116
Analog sensors 118
PWM expander – PCA9685 119
GPIO expander – PCF8575 122
Small displays 123
Other I2C sensors 126
Accelerometer/gyroscope – MPU6050 127
Summary 128
Chapter 6: SPI - Faster Bidirectional Communication 129
Technical requirements 129
Overview of SPI 130
LED strip 132
Usage on displays 133
LED matrix 134
SPI version of SSD1306 138
Summary 140
Chapter 7: The Real Power of Android Things 141
Technical requirements 141
Using Android UI 142
Companion apps and communication 144
REST API using NanoHttpd/Retrofit 145
Firebase Realtime Database 148
Nearby 153
Advertising and discovering 155
Initiating and confirming connections 155
Sending and receiving data 157
More cool stuff 158
TensorFlow – image classifier 158
Publish subscribe buses 159
Google Assistant – Home control 160
Online resources 161
Summary 161
Appendix A: Pinouts diagrams and libraries 162
Raspberry Pi Pinout 162
NXP iMX7D Pinout 163
Table of Contents
[ iv ]
Supported and unsupported libraries 164
Unsupported features 164
Common intents and content providers 165
Available Google APIs 165
Unavailable Google APIs 166
Other Books You May Enjoy 167
Index 170