Setting Up the Pi Zero Wireless Pan-Tilt Camera

Pages
Contributors: SFUptownMaker
Favorited Favorite 12

Prepare the MicroSD Card

To prepare the microSD card, we need to:

  • Download the latest Raspberry Pi Raspbian Jessie image.
  • Create an microSD card that contains this boot image.
  • Edit the "config.txt" file on the microSD card to enable the serial debug console.
  • Create a "wpa_supplicant.conf" file on the SD card to enable WiFi.

Let's walk through these steps in more detail!

Download the Latest Raspbian Jessie Image

You can find the image on the Raspberry Pi Foundation Website. It's a fairly large download so go get a snack or play a game or something.

Burn the Image to an MicroSD Card

To write the image to the card, there exists an excellent utility for Mac/Linux/Windows called Etcher. Simply download and install it to your computer. Then select the image you downloaded earlier, the drive you want to install to (Etcher won't let you install to anything but a removable drive, and if only one drive is available, it will select it automatically!), and click "Flash!"

Etcher screenshot

This is another long-ish process, requiring several minutes to complete. Once complete, the window will display a "Flash Complete!" message.

Etcher done

By default, Etcher "ejects" the card after it has created the image, so you'll need to pull it out and reinsert it to get your computer to reload the disk.

Edit the "config.txt" File on the MicroSD Card

To continue, we're going to need to edit a file on the microSD card. This file will be visible from any operating system, although on a Linux system it's in a slightly different location.

On a Windows or Macintosh, the files will be loaded in the root directory of the microSD card, so when you open a window of the drive, you'll see them directly. In Linux, the card will be mounted, and you'll have to navigate to the "Boot" directory on the card to find the file we're looking for.

Here's a list of all the files in the directory of interest.

Boot directory ls

Click the image for a closer look.

Open the file "config.txt" in your favorite text editor (i.e. Notepad++, TextWrangler, ConTEXT Editor, etc.) and add this line to the very end:

enable_uart=1

Create a "wpa_supplicant.conf" File on the MicroSD Card to Enable WiFi

The last thing we need to do to prepare the microSD card is to create a "wpa_supplicant.conf" file on the card. This file contains the information needed for your local wireless network setup.

Create a new file using your favorite text editor. On Windows we recommend Notepad, as it provides WYSIWYG content and allows you to save a file with an arbitrary file extension. On MacOS, TextWrangler seems to be the easiest. For Linux, your default system text editor should be fine.

The contents of the file can be quite simple. Most likely, you can get away with something that looks like this:

language:bash
network={
    ssid="YOUR_SSID"
    psk="YOUR_PASSWORD"
    key_mgmt=WPA-PSK
}

Once added, modify the network ID and password for your WiFi network. Then save the file as "wpa_supplicant.conf" to the microSD card.

Pull the MicroSD Card and Insert It into the Pi Zero W

This is all we need to do in preparation of our first boot. You can now remove the card from your computer and put it into the Pi Zero W. Don't power it up yet, though!