In order to get started with Johnny-Five and the Raspberry Pi, we will need to set up the Raspbian operating system by burning it to a microSD card. Then, we'll need to edit some files on the SD card in order for the Raspberry Pi to boot with Wi-Fi and the ability to SSH in. Lastly, we'll need to boot up the Raspberry Pi and get some settings in place before finally installing Node.js, Johnny-Five, and Raspi-IO.
Installing the operating system
Downloading Raspbian Lite
The following steps will show you how to download Raspbian Lite:
- The first step is downloading the Raspbian Lite image so we can burn it to our microSD card. The best place to get the image from is https://www.raspberrypi.org/downloads/raspbian/, as shown in the following screenshot:

- Select RASPBIAN STRETCH LITEÂ (or whichever version is the current one), which will replace the word STRETCH. Give yourself some time for this step to complete; although Raspbian Lite is much smaller than Raspbian Full, it is still several hundred megabytes, and can take time to download!
Burning the image to an SD card
Luckily, the tools for burning OS images to SD cards have evolved arcane command-line tools that can overwrite your computer's hard drive as easily as it can the SD card. My current favorite is called Etcher, and it can be downloaded for any platform at https://etcher.io/, as shown in the following steps:
- The free version is more than enough for our needs, so download and install it as you download Raspbian Lite.
- Once they are both downloaded, you'll want to place the micro SD card in your computer, either by placing it into a full-sized SD adapter and then into a slot on your computer, or by using a USB-to-micro-SD adapter. Whichever you use, make sure your computer can see the volume as a drive before continuing. Then, boot up Etcher. The following screenshot shows Etcher running on a Mac:

- Once you see a window similar to the preceding screenshot, you'll need to select the Raspbian Lite image you just downloaded. You don't even need to unzip the .zip file—Etcher can handle that outright! Once you've selected the image, Etcher should select your micro SD card drive, so long as your machine can see it! Once you've ensured that the image and micro SD card drive are properly selected, hit Flash! to begin the process.
A few minutes will pass as Etcher burns the image to your micro SD card, then verifies that it is present on the card. Once this is done, remove and reinsert the micro SD card so that your computer recognizes it as a drive again; the drive should be named boot. We're not quite done editing the image files yet, so Etcher's polite attempt to eject the micro SD card drive needs to be ignored.
Editing files on the SD card
We need to edit and create some files on our Raspberry Pi's image in order to be able to access it with SSH when we turn on the Raspberry Pi. First, we'll set up the Wi-Fi using the following steps:
- In order to set up the Wi-Fi, you'll want to create a file in the root of the micro SD card drive called wpa_supplicant.conf that contains the following text:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
network={ ssid="yourNetworkSSID" psk="yourNetworkPasswd" }
- Replace yourNetworkSSID with the SSID of the Wi-Fi network you wish to connect to, and then replace yourNetworkPasswd with that Wi-Fi's network password.
- After you've set up the Wi-Fi network, you'll want to tell the Raspberry Pi to allow you to SSH into it. To do this, you'll want to create a file called ssh in the same root folder as the wpa_supplicant.conf file. Make sure that the ssh file is empty and has no extension. When you're all done, the root directory of the micro SD card drive will look similar to the following screenshot:

Once this is all done, fully eject the microSD drive, take the microSD card and insert it into the Raspberry Pi. We're now ready to boot up the Raspberry Pi and start installing software.
Booting up the Pi
Once the micro SD card is inserted, plug your power source into your Raspberry Pi. A red and green LED should light up. The red LED should be solid—this is the power indicator. The green light will flicker on and off—this is the LED that indicates activity. The Raspberry Pi should take a maximum of a minute or so to boot up once you've plugged it in. Next, we'll SSH in.Â
SSHing from a Linux or Mac
If you're on a Mac or Linux machine, you'll open up a Terminal and type the following:
ssh pi@raspberrypi.local
If you're successful, you'll see a question appear, asking about the authenticity of the host. Respond by typing yes and hitting Enter. You'll then be asked for a password, which is raspberry, as shown in the following screenshot:Â

Once you've entered the password, you should see the following:

SSHing from Windows
In order to SSH from a Windows machine, you'll need to use a program called PuTTY. You can get it on https://putty.org/. But first, you'll want your Raspberry Pi's IP address. You'll need a monitor, an HDMI cable, and a USB keyboard. Once you have these, go through the following steps:
- Plug the monitor, HDMI cable, and USB keyboard into the Raspberry Pi before booting it up. Then plug in the power supply.
- When it prompts you for a username, type pi. When it asks for a password, enter raspberry. Once you are logged in, type ifconfig. You should see a lot of information appear.
- Look for the wlan0 section and the inet address under that heading. For the following output, the IP is 192.168.1.106, as shown in the following screenshot. Write this IP down. Then, you can unplug the display and the keyboard—you won't need them again:

- Once you have the IP address for your Raspberry Pi, you can boot up PuTTY. The window that opens is the configuration window, as shown in the following screenshot:Â

- Type the IP address that you obtained into the field labeled Host Name (or IP address) and click the Open button. You'll be asked about the authenticity of the host (only the first time you connect). Select Yes. Then enter Pi as the username and raspberry as the password when prompted. Once that's done, you should see the following:

Now that everyone's logged in, let's set up our Raspberry Pi for our projects!