【转载请注明出处: 】
《树莓派Android Things物联网开发》系列文章专栏
Samples 案例
Welcome to code samples for Android Things. Here you will find code snippets and tutorials to help you build embedded applications and integrate hardware peripherals. You can get started with the following samples:
欢迎来到Android Things代码案例。在这里你将找到代码片段和教程来帮助你构建嵌入式应用和集成硬件外围设备。你可以通过以下例子开始:
- - Runs basic code that exercises the PIO APIs in Java. Each sample is an Android module that can be run independently.
- 在Java中运行PIO API的基本代码。每个样本都是可以独立运行的Android模块。
- - Runs basic code that exercises the PIO APIs in C/C++. Each sample is an Android module that can be run independently
- 在C/C++中运行PIO API的基本代码。每个样本都是可以独立运行的Android模块。
- - Basic user interface that represents each GPIO on the board by an interactive switch widget on the display.
- 基本用户界面,通过显示屏上的交互式开关组件控制板上的每个GPIO。
- - Using a button input driver from the peripheral driver library to listen for GPIO state changes and generate Android key events.
- 通过外围驱动库的按键输入驱动监听GPIO的状态改变,并产生Android按键事件。
- - Emulates a loopback adapter for the selected UART port. Echoes all data back out the same port.
- 串口操作示例
- - Smart doorbell that captures a camera image, analyzes it, and sends it to a companion app using the Google Cloud Platform and Firebase.
- 智能门铃,从摄像头捕获一张图像进行分析,并使用Google Cloud Platform和Firebase将其发送到应用程序。
- - Integration of multiple peripheral sensors to analyze and display current weather information. Data can optionally push to the Google Cloud Platform for further analysis.
- 气象站,集成多个外围传感器来分析和显示当前天气信息。数据可以选择推送到Google Cloud Platform进行进一步分析。
- - Demonstrates accessing the camera, performing object recognition and image classification using machine learning, and speaking out the results using text-to-speech (TTS).
- TensorFlow,演示访问摄像机,使用机器学习进行对象识别和图像分类,并使用文本转语音(TTS)说出结果。
- - Enables a Bluetooth device to connect to a peer device and play audio on it (and vice-versa).
- 蓝牙音频,启用蓝牙设备连接到终端设备并播放音频(反之亦然)。
- - Exposes time information to client Bluetooth devices. The Android client receives a notification when the time is changed on the server.
- 蓝牙GATT服务器,向客户端蓝牙设备提供时间信息。在服务器上更改时间时,Android客户端会收到通知。
- - Iterates over all the USB devices discovered by the host and prints their interfaces and endpoints.
- USB枚举,遍历主机所有USB设备,并打印其接口和终端。
- - Uses an animation API to flicker a pair of LEDs to mimic the behavior of a candle. Includes hardware design files and a bill of materials to assist in building a production device.
- 使用动画API闪动两个LED来模拟蜡烛。包括硬件设计文件和物料清单以便制作生产。
- - Integration of a motion detector and weather-related peripheral sensors. Data is pushed to the Google Cloud Platform for low-latency messaging.
- 云IOT传感集线器,集成运动检测和天气相关外围传感器。数据被推送到Google Cloud Platform以进行低延迟消息传递。
- - Demonstrates how to call the Google Assistant gRPC API from a device. Records the spoken request from a connected microphone and plays back the Assistant's spoken response on a connected speaker.
- 演示如何从设备调用Google Assistant gRPC API。从连接的麦克风记录语音请求,并通过扬声器播放的语音响应。
- - Sample peripheral drivers for Android Things. Includes drivers for an OLED screen, GPS, accelerometer, and more.
- Android的外设驱动程序。包括OLED屏幕,GPS,加速度计等驱动程序。
You can find additional code samples at the on GitHub.
您可以在GitHub的 上找到其他代码示例 。
英文原文链接https://developer.android.com/things/sdk/samples.html