Raspberry Pi 3

Raspberry Pi 3 Model B is the latest iteration of the world's most popular single
board computer. It provides a quad-core 64-bit ARM Cortex-A53 CPU running at
1.2GHz, four USB 2.0 ports, wired and wireless networking, HDMI and composite
video output, and a 40-pin GPIO connector for physical interfacing projects.

Select the option to install Android Things and optionally set up Wi-Fi.

Select Raspberry Pi 3 as the hardware board.

Choose either a generic image or your own custom image of Android Things
for flashing the board.

Note: A generic image is a quick way to get started using Android
Things, specifically for early prototyping. You will not have access to
other Console features, such as metrics, crash reports, and over-the-air
(OTA) updates. A custom image is for developers in the later stages of
development beyond early prototyping. It can be downloaded
from the Android Things Console after
creating a product.

Follow the rest of the utility prompts to write the image. When the
utility has finished writing the image, eject the external drive and
remove the microSD card.

Insert the microSD card into the microSD slot on the underside of the
Raspberry Pi.

Serial debug console

The serial console is a helpful tool for debugging your board and reviewing
system log information. The console is the default output location for kernel
log messages (i.e. dmesg), and it also provides access to a full shell prompt
that you can use to access commands such as logcat.
This is helpful if you are unable to access ADB on your board through other
means and have not yet enabled a network connection.

Open a connection to the USB serial device on your development computer using a
terminal program, such as PuTTY (Windows),
Serial (Mac OS), or
Minicom (Linux). The serial port
parameters for the console are as follows:

Baud Rate: 115200

Data Bits: 8

Parity: None

Stop Bits: 1

I/O Pinouts

The Raspberry Pi has pins that are multiplexed between various board functions.
Some board functions cannot be used simultaneously (for example, enabling
Bluetooth and using the UART0 port for peripheral I/O). For more information,
see the pin function modes.

Note: You can use the PIO CLI Tool to
do simple test operations on these interfaces.

The following pinout diagram illustrates the locations of the available ports
exposed by the breakout connectors of this board:

GPIO Signal

Alternate Functions

BCM2

I2C1 (SDA)

BCM3

I2C1 (SCL)

BCM7

SPI0 (SS1)

BCM8

SPI0 (SS0)

BCM9

SPI0 (MISO)

BCM10

SPI0 (MOSI)

BCM11

SPI0 (SCLK)

BCM13

PWM1

BCM14

UART0 (TXD)

MINIUART (TXD)

BCM15

UART0 (RXD)

MINIUART (RXD)

BCM18

I2S1 (BCLK)

PWM0

BCM19

I2S1 (LRCLK)

BCM20

I2S1 (SDIN)

BCM21

I2S1 (SDOUT)

Pin Function Modes

The following modes in each table are mutually exclusive on the Raspberry Pi
3.

UART modes

The Raspberry Pi has a single full-speed UART (UART0) and a mini UART
(MINIUART); see the official docs
for information on their differences. These UARTs are multiplexed
between various board functions and cannot be used simultaneously. The following
modes are supported:

Note: Switching back to Audio mode requires a device reboot due to
limitations of the hardware.

When you are creating a hardware configuration in the
Android Things Console, BCM18 and BCM19
pullup and pulldown resistors don't apply until the GPIO is actually
opened in order to avoid interfering with the I2S bus on the same pins.

Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.