Raspberry Pi For Dummies. Sean McManus
Читать онлайн книгу.the software updates available.
When the setup is complete, you have the option to restart now, so any changes you’ve made to the settings take effect, or to restart later. We recommend you restart now.
Configuring Your Raspberry Pi in Raspberry Pi OS
For most of the rest of this book, we assume that you’re using Raspberry Pi OS with the desktop. It’s the most user-friendly option and the best way to get started with the Pi.
When your Pi has finished booting, you should be in the desktop environment. You’ll learn more about this topic in Chapter 4, but for now, let’s take a look at how you use it to finish setting up your Pi or adjust its settings in the future.
Click the button in the top left, with the Raspberry Pi logo on it, to open the menu. Move down to Preferences and choose Raspberry Pi Configuration. The tool that opens is shown in Figure 3-1.
Sean McManus
FIGURE 3-1: The Raspberry Pi Configuration tool in the desktop.
By default, the tool opens to its System tab. The options here include
Change the password. The default password for the username pi is raspberry.
Change the hostname (which is the name used for this Raspberry Pi on the network).
Control whether it boots into the desktop or the command line interface (CLI), which is explained in Chapter 5.
Set whether the pi user is automatically logged in.
Set the Pi to wait for the network at the start.
Display the graphical splash screen that shows when the Pi is booting.
Change whether the power LED on the board is constantly lit, or only when there is activity on the microSD card.
The tool’s Display tab allows you to enable pixel doubling, so you can better see the screen output on very high-resolution displays and to enable or disable the screen blanking screensaver. You can also enable or disable underscan. Underscan and overscan change the size of the displayed screen image to optimally fill the screen. Underscan should be disabled to fill the screen if you see a black border around your screen and enabled if the desktop doesn’t all fit on the screen.
The tool’s Interfaces tab enables you to enable or disable various connection options on your Raspberry Pi, including enabling the Raspberry Pi camera. Other options here include SSH (short for Secure Shell), which is a way of setting up a secure connection between computers, usually so that you can control one computer from another computer. The VNC software enables remote access to your Raspberry Pi with a graphical interface and is also enabled here. (For more on SSH and VNC, see “Connecting Using SSH” and “Connecting Using VNC,” later in this chapter.) The other interfaces are SPI, I2C, Serial Port, Serial Console, 1-Wire, and Remote GPIO (which enables another machine on the network to access the Pi’s GPIO pins). In most cases, you only need to change these settings if you’re using a particular add-on or working on a project that requires them.
The tool’s Performance tab gives you access to options for overclocking and changing the GPU memory.
So, what is overclocking, anyway? It’s when you make a computer work faster than the manufacturer recommends, by changing some of its settings. That said, the options offered to you within this tool have been chosen by the Raspberry Pi Foundation, and they have previously said they don’t expect overclocking to cause any measurable reduction in your Pi’s lifetime. The speed of the CPU is measured in MHz, and the highest overclocking setting increases the speed to 1000 MHz. You won’t necessarily be able to use the top setting: It depends on your Pi and your power supply. Overclocking is not currently supported on the Raspberry Pi 3, 4, or 400.
As for changing the GPU memory, here’s the lowdown on that particular option: Your Raspberry Pi’s memory is shared between the central processing unit (CPU) and the graphics processing unit (GPU). These processors work together to run the programs on your Raspberry Pi, but some programs are more demanding of the CPU, and others rely more heavily on the GPU. If you plan to do lots of graphics-intensive work, including playing videos and 3D games, you can improve your Raspberry Pi’s performance by giving more of the memory to the GPU. Otherwise, you may be able to improve performance by stealing some memory from the GPU and handing it over to the CPU. Raspberry Pi OS allocates 76MB to the graphics processor and gives the rest to the CPU. In most cases, this setting will work fine, but if you experience problems, you can change how the memory is shared between the two processors. The configuration menu asks how much memory you want to give to the GPU and fills the entry box with the current value as a guide. The rest of the memory is allocated to the CPU. You can safely experiment with the memory split to see which works best for the kind of applications you like to use.
If you’re using the Raspberry Pi Case Fan (see Chapter 1), you need to enable it in the Performance tab.
The options on the tool’s Localisation tab enable you to set the character set used in your language (the locale), your time zone, the keyboard setup you want to use, and your Wi-Fi country. If you’re using the Raspberry Pi outside its home country of the U.K., you may find you need to adjust settings here, especially if you see unexpected results when using the keyboard.
You can adjust the mouse and keyboard sensitivity separately by going through the main menu to the mouse and keyboard settings, also in the
Preferences
folder.
If you’re using Raspberry Pi OS without the desktop, you can find an alternative tool for configuration options by typing sudo raspi-config on the command line. Note that you can’t use the mouse to move through its menus. You use up- and down-arrow keys to select different options on the screen, and left- and right-arrow keys (or Tab, which is usually above the Caps Lock key) to select actions such as OK, Cancel, Select, and Finish. Press Enter to confirm a choice.
There’s a screen configuration tool for adjusting the screen resolution and orientation. Open the menu, go to the Preferences category, and choose Screen Configuration. In the tool, click Configure on the menu, select Screens, and choose your screen. Alternatively, you can right-click the large screen name (for example, HDMI-1). You can then adjust the resolution as shown in Figure 3-2. After choosing your settings, click the green tick to confirm and then click OK if it looks fine. If the changes stop your screen from working properly, just wait and the previous settings will revert after 10 seconds.
FIGURE 3-2: Adjusting the screen resolution.
Changing Your Wi-Fi Settings
To change your Wi-Fi settings, click the fan-shaped icon in the top right, shown in Figure 3-3. It opens a menu that shows you the available networks, together with an option to turn off Wi-Fi.