We will use the following items to complete the setup:
- A Raspberry Pi 3 Model B.
- A monitor for display, preferably with HDMI connectivity. If your monitor supports only VGA, you can use a VGA to HDMI converter.
- A keyboard and mouse that can be connected to Pi through USB.
- A MicroSD card and card reader. Since Pi doesn't have onboard storage, we will install the OS on the SD card itself, so at least 8 GB is preferable.
- A power supply: Raspberry Pi is powered by micro USB. Use a good adapter with a 2.5 A rating.
If you do not have a keyboard, mouse, and monitor, you can still set up using a headless approach and move to the next topic directly. For now, let's start by setting up Pi using a keyboard, mouse, and monitor.
Install the OS on your SD card. We will install the Raspbian version of the OS here:
- The best way to install an OS is through New Out of the Box Software (NOOBS).
- Put your SD card in your computer or SD card reader.
- Download NOOBS from Raspberry Pi's official website. The download link is https://www.raspberrypi.org/downloads/noobs.
- Select the Offline and network install option shown in Figure 2.4:
Figure 2.4
- Now format the SD as FAT. Based on your computer's OS, you can follow the link to format your SD card: https://www.raspberrypi.org/documentation/installation/noobs.md.
- Extract the ZIP file and transfer all the content onto the SD card. Remove the SD card from your computer and insert it into Raspberry Pi's SD card slot.
- Power on the Raspberry Pi after connecting a monitor, keyboard, and mouse to it. You will see the NOOBS screen (refer to Figure 2.5) with the option of the OS you want to install. Nowadays, only Raspbian is available in a NOOBS installation:
Figure 2.5
- At the bottom, please select your preferred language and keyboard style.
- Click on the checkbox next to Raspbian [RECOMMENDED], then click on Install. It will take 10–20 mins to complete the installation process.
- After the completion of the installation process, the GUI will open up, just like in Figure 2.6:
Figure 2.6
- Configure the username, password, and hostname from Raspberry Pi's Configuration tab by clicking on Preferences under Menu, as shown in Figure 2.7:
Figure 2.7
- In the Raspberry Pi Configuration window, click on the System tab and provide a Hostname, Password, and Username as shown in Figure 2.8:
Figure 2.8
- On the Interfaces tab, we can enable I2C, SPI, serial communication, and also SSH and VNC to log in to Pi remotely, as shown in the following screenshot:
Figure 2.9