All Projects → androidthings → sample-uartloopback

androidthings / sample-uartloopback

Licence: Apache-2.0 License
Echo received characters over a UART with Android Things

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to sample-uartloopback

Android Things Electricity Monitor
Electricity Monitor using Android Things and Firebase Realtime Database
Stars: ✭ 118 (+66.2%)
Mutual labels:  android-things
FRILLER
FRILLER is a 3D printed compact robot that can change the radius of its wheels to overcome obstacles.
Stars: ✭ 15 (-78.87%)
Mutual labels:  android-things
sensorhub-cloud-iot
Sensor-based data collection device publishing to Cloud IoT Core
Stars: ✭ 73 (+2.82%)
Mutual labels:  android-things
Jlibmodbus
JLibModbus is an implementation of the Modbus protocol v1.1b in java language.
Stars: ✭ 149 (+109.86%)
Mutual labels:  android-things
Weatherstation
Sensor-based peripheral sample using Android Things
Stars: ✭ 210 (+195.77%)
Mutual labels:  android-things
Fool
Simple Russian voice assistant based on Android Things and Raspberry Pi 3
Stars: ✭ 26 (-63.38%)
Mutual labels:  android-things
Sample Button
Basic input and output using a button and LED
Stars: ✭ 107 (+50.7%)
Mutual labels:  android-things
ThingsCommander
Things Commander System, based on Android Things developer preview 2
Stars: ✭ 13 (-81.69%)
Mutual labels:  android-things
photobooth
Cloud-connected talking photobooth using TensorFlow
Stars: ✭ 40 (-43.66%)
Mutual labels:  android-things
atdocs
Android Things Translation 中文翻译
Stars: ✭ 19 (-73.24%)
Mutual labels:  android-things
Drivers Samples
Peripheral driver samples
Stars: ✭ 153 (+115.49%)
Mutual labels:  android-things
Sample Simplepio
Basic Peripheral I/O examples with Android Things
Stars: ✭ 191 (+169.01%)
Mutual labels:  android-things
androidthings-mqtt-alarm-panel
Android Things Alarm Control Panel for Home Assistant
Stars: ✭ 69 (-2.82%)
Mutual labels:  android-things
Sample Bluetooth Audio
Bluetooth A2DP sample using Android Things
Stars: ✭ 146 (+105.63%)
Mutual labels:  android-things
androidthings-weatherstation
Codelab and solution for the Android Things Weatherstation
Stars: ✭ 16 (-77.46%)
Mutual labels:  android-things
Sample Simpleui
Connect GPIO states with a graphical UI on Android Things
Stars: ✭ 116 (+63.38%)
Mutual labels:  android-things
sample-lowpan
Discover and connect to Thread mesh networks on Android Things
Stars: ✭ 28 (-60.56%)
Mutual labels:  android-things
native-libandroidthings
NDK library for exposing Peripheral I/O APIs in C/C++
Stars: ✭ 28 (-60.56%)
Mutual labels:  android-things
android-things-rc522
Android library to communicate with RFID Module RC522
Stars: ✭ 44 (-38.03%)
Mutual labels:  android-things
edison-candle
Production sample using Android Things
Stars: ✭ 42 (-40.85%)
Mutual labels:  android-things

UART Loopback

This sample demonstrates basic data read and write operations over a UART. The application creates a loopback interface that immediately echoes any data read from the receive (RX) buffer to the transmit (TX) buffer.

Note: The Android Things Console will be turned down for non-commercial use on January 5, 2022. For more details, see the FAQ page.

Screenshots

UART Loopback sample demo

(Watch the demo on YouTube)

Pre-requisites

  • Android Things compatible board with an available UART port
  • Android Studio 2.2+
  • FTDI TTL-232R or compatible USB-TTL converter

Schematics

Schematics for Raspberry Pi 3

NOTE: Raspberry Pi 3 shares the UART pins between multiple ports, including the serial debugging console. Refer to the mode matrix for more details.

Check in the USB TTL cable's documentation for the TX and RX wire colors:

  • connect the cable TX wire to the board RX pin
  • connect the cable RX wire to the board TX pin

Build and install

  1. On Android Studio, click on the "Run" button.

If you prefer to run on the command line, type

./gradlew installDebug
adb shell am start com.example.androidthings.loopback/.LoopbackActivity
  1. Plug the USB-TTL converter into a host PC, start your favorite terminal program (minicom, screen, RealTerm, etc.), and connect to the USB-TTL port at 115200 baud.

  2. Type characters into the terminal and observe them echo back to you from the device.

License

Copyright 2016 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].