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.
Flashing the image
Before you begin flashing, you will need the following items in addition to your Raspberry Pi:
- Micro-USB cable
- Ethernet cable
- MicroSD card reader
- 8 GB or larger microSD card
- HDMI cable
- HDMI-enabled display
Step 1: Flash Android Things
Follow these steps to flash the Android Things image onto the microSD card:
Download the Android Things Setup Utility from the Android Things Console. You will need to sign in to your Google account and accept the licensing agreement and terms of service.
Unzip the downloaded archive.
Start the setup utility.
- On Windows, right-click on the executable file and select Run as administrator.
On Mac or Linux, start the utility from the terminal. For example:
$ sudo ~/Downloads/android-things-setup-utility/android-things-setup-utility-linux
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.
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.
If you don't want to use the setup utility, you can:
Download an image from the Android Things Console and write it to the microSD card:
Step 2: Connect the hardware
Make the following connections to your board:
- Connect a USB cable to J1 for power.
Connect an Ethernet cable to your local network.
(Optional) Connect an HDMI cable to an external display.
Verify that Android is running on the device. To do this, you need to find the IP address of the device:
- If you connected a display, the Android Things Launcher will use it to show information about the board, including the IP address.
- If you assigned an IP address to the device using DHCP, find this address in the network settings of your router or development computer.
Connect to the IP address using the adb tool:
$ adb connect <ip-address> connected to <ip-address>:5555
After flashing your board, it is strongly recommended to connect it to the internet. This allows your device to deliver crash reports and receive updates.
To connect to Wi-Fi, do one of the following:
- Run the setup utility and select the Wi-Fi setup option.
- Connect a display and configure Wi-Fi though the launcher app.
- Connect to Wi-Fi with
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.
To access the serial console, connect a USB to TTL Serial Cable to the device UART pins as shown below.
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
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 function mode matrix.