Skip to content

Raspberry Pi OS (Raspian) Installation

In order to commission Sprocket, the latest version of Raspian must be installed and running on the Raspberry Pi computer.

Requirements

  • 1x MicroSD Card
  • SD card adapter w/ SD reader or USB MicroUSB adapter

Raspian Download

Plug your SD card into your computer (using an SD adapter or USB MicroSD card writer).

Download the Raspberry Pi Imager from the official Raspberry Pi website. This will be used download and flash the most recent version of the Raspberry Pi OS (Raspian) to the SD card.

OS Selection

Launch the imager software, and select Raspberry Pi OS Lite (32-bit) under the "Raspberry Pi OS (other)" tab. Select your SD card in the Storage window.

Network and Locale Settings

Before clicking Write, open the settings window using the gear icon in the lower right corner of the imager software so you can configure the network settings before flashing the OS.
Raspberry Pi Imager

You will need to specify a desired hostname. This is how your Raspberry Pi (and Sprocket) will be identifiable on your home WiFi network. Use any name you want, default hostname is "sprocket".

Check the tickbox to enable SSH, and set the radio button for "Use password authentication". Below, set your desired username and password for the Pi.

Check the tickbox for "Configure wireless LAN", and enter your WiFi network's SSID and password. Make sure to update the "Wireless LAN country" field - in the US, the country code is "US".

Optionally, set your locale settings (for correct timezone and keyboard layout) by checking the tickbox for "Set locale settings" and selecting the appropriate values.

Click Save, and then click Write.

Raspberry Pi Imager Settings

Power On Raspberry Pi

Once flashing is complete, insert the SD card into the Raspberry Pi. You will need to temporarily remove Sprocket's cover to access the SD slot on the back of the Raspberry Pi. Power up Sprocket, and wait a minute for the OS to boot.

On your computer, open a command window and check that the Raspberry Pi is communicatable over Wifi using the ping command.

ping YOUR_HOSTNAME_HERE 
If communication is successful, you will see a result simmilar to below. Successful Communication

If you are unable to communicate with the Raspberry Pi, some online tutorials regarding Raspberry Pi network setup may be helpful. Do not proceed until you can successfully ping your Raspberry Pi.

SSH Connection

Installing SSH on your computer

If you receive an error message stating command not found or 'ssh' is not recognized as an internal or external command, you will need to install or enable ssh on your computer. By default on Mac or Linux computers, ssh will be preinstalled. On Windows, you may need to enable OpenSSH by following Microsoft's instructions here. You will only be using SSH Client, no need to enable SSH Server.

Connect to the Raspberry Pi over SSH using the commandline ssh command, as shown.

ssh YOUR_USERNAME_HERE@YOUR_HOSTNAME_HERE

The first time you connect over SSH, you may be asked to verify the authenticity of the ssh host. Type yes and press enter to continue connecting. SSH Authentication

You will be prompted for the password you specified earlier, enter it and press enter. You may not see any characters in the command window when you type your password. This is normal behavior. A successful SSH connection looks as follows. SSH Connection Successful

From here on out, unless explicitly stated otherwise, any commands will be run on the Raspberry Pi over SSH.

Network Check

Check that the internet connection works by issuing a "ping hardyautomation.com" command.

ping hardyautomation.com

Info: Exiting a command line program

Use the key combination Ctrl+C to stop a command line program from running. This sends a SIGINT signal, which stops the currently running program.

If you can successfully connect to an external URL, your internet connection is working. Internet Connection Working