1. 程式人生 > >樹莓派Android Things物聯網開發:GitHub案例程式彙總

樹莓派Android Things物聯網開發:GitHub案例程式彙總

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程式碼案例。在這裡你將找到程式碼片段和教程來幫助你構建嵌入式應用和整合硬體外圍裝置。你可以通過以下例子開始:

  • Simple PIO - 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模組。
  • Native PIO - 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模組。
  • Simple UI - Basic user interface that represents each GPIO on the board by an interactive switch widget on the display.
  • 基本使用者介面,通過顯示屏上的互動式開關元件控制板上的每個GPIO。
  • Button - Using a button input driver from the peripheral driver library to listen for GPIO state changes and generate Android key events.
  • 通過外圍驅動庫的按鍵輸入驅動監聽GPIO的狀態改變,併產生Android按鍵事件。
  • UART Loopback - Emulates a loopback adapter for the selected UART port. Echoes all data back out the same port.
  • 串列埠操作示例
  • Doorbell - 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將其傳送到應用程式。
  • Weather Station - 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進行進一步分析。
  • TensorFlow - 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)說出結果。
  • Bluetooth Audio - Enables a Bluetooth device to connect to a peer device and play audio on it (and vice-versa).
  • 藍芽音訊,啟用藍芽裝置連線到終端裝置並播放音訊(反之亦然)。
  • Bluetooth GATT Server - Exposes time information to client Bluetooth devices. The Android client receives a notification when the time is changed on the server.
  • 藍芽GATT伺服器,向客戶端藍芽裝置提供時間資訊。在伺服器上更改時間時,Android客戶端會收到通知。
  • USB Enumerator - Iterates over all the USB devices discovered by the host and prints their interfaces and endpoints.
  • USB列舉,遍歷主機所有USB裝置,並列印其介面和終端。
  • Edison Candle - 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來模擬蠟燭。包括硬體設計檔案和物料清單以便製作生產。
  • Cloud IoT Sensor Hub - 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以進行低延遲訊息傳遞。
  • Google Assistant API - 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。從連線的麥克風記錄語音請求,並通過揚聲器播放的語音響應。
  • Drivers - 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 Android Things page on GitHub.