Читать книгу Raspberry Pi Projects For Dummies - Evans Jonathan - Страница 13
Part I
Getting Started with Raspberry Pi Projects
Chapter 1
Getting to Know the Raspberry Pi
Setting Up with Raspi-config
ОглавлениеRaspi-config is a little program that automatically loads to help you to get your Raspberry Pi ready to run, the first time you start up. It gives you a list of the basic system options in case you want to change them. After it’s set up the first time, it won’t run again unless you launch it manually. You use the keyboard arrows to move up and down the menu of options and the left and right arrows to select options. Pressing Enter confirms your selection.
The options in the menu change from time to time. You may encounter an older version of the software with different menu items, but here’s a rundown of what they are and what they do (as of this writing):
✔ Expand Filesystem: When you flash your SD card with your operating system, it makes an exact copy (an “image”) of the Linux distribution files, and the formatting of the disk itself is likely to be smaller than the actual available space on your card. The image files don’t take up much space, and if you have a large SD card, it will look like your SD card has much less capacity than it actually does.
To overcome this problem, it’s very important to use this option to expand your root file system to use all the available space on the card. Otherwise, you could run out of room! When you press Enter with this option, it runs immediately. The next time you start your Raspberry Pi, the command will resize your file system to use all the available room. This can take a few minutes; the screen won’t respond until it’s done. After it’s finished, all the space will be available to you.
✔ Change User Password: Lets you set the password for the default user of your Raspberry Pi, which is the user pi. You don’t need to change this. If you do, make sure not to forget it because there’s no way to get it back from the system!
✔ Enable Boot to Desktop/Scratch: You can use this option to make your Raspberry Pi go straight into the graphical operating system at startup. Otherwise, you have to start it manually (see the next section).
✔ Internationalization Options: This option takes you to a submenu where you can configure several options depending on where you’re located:
• Change locale: Allows you to change your language and character set. Leave this option alone if you want to use your Raspberry Pi in English.
• Change timezone: Tells your Raspberry Pi where you’re located. Afterward, it detects the time from your Internet connection.
• Configure_keyboard: Allows you to select your keyboard model and layout. When you press Enter, a long list of keyboards will be displayed. If nothing seems to be happening, be patient. It can take a few seconds for the list of keyboards to show up. Choose the one you want to use and then select the keyboard layout you want to use (for example, UK).
✔ Enable Camera: If you’ve purchased an optional Camera Module, this menu allows you to set it up to work with your Raspberry Pi.
✔ Add to Rastrack: Racktrack allows you to add your Raspberry Pi to the global map of users around the world. You can see all the other tracked Raspberry Pis on their website at http://rastrack.co.uk.
✔ Overclock: Overclocking is a way of speeding up the CPU to perform calculations faster than the manufacturer intended. The clock speed is the heartbeat that determines how many instructions your CPU processes per second. Manufacturers build in a bit of leeway to ensure that they can guarantee the speed that your CPU is rated to. If you overclock your CPU, your Raspberry Pi will run faster, but its lifespan may be reduced, and it’s likely to run a bit hotter. If you change this setting and your Raspberry Pi no longer works, hold down the Shift key when you power up to return your Raspberry Pi to disable overclocking.
✔ Advanced Options: Advanced Options contains several settings that are a bit more involved, so we don’t use them in this book. But they are good to know. The options are as follows:
• Overscan: Allows you to ensure that the picture is centered on your monitor and uses the available room correctly. If you have a black border around your image that you don’t want, disable this option. Otherwise, you can leave it alone.
• Hostname: Allows you to set the name of your Raspberry Pi network. You probably won’t need to modify this.
• Memory Split: Your onboard memory is shared between the CPU and the GPU. Depending on what you’re doing with your Raspberry Pi, your programs may use one or the other more intensively. For example graphics and gaming programs make more intensive demands on the GPU, so you can increase your Raspberry Pi’s performance by giving more memory to the GPU. Raspbian Wheezy uses 64MB to the GPU by default, and for most purposes this will be fine. You can experiment with this setting to see what setting works best for you.
• SSH: Secure Shell (SSH) is a secure way of communicating between computers using an encrypted connection, so that you can control one computer from another one. Unless you’re familiar with this feature, you can ignore this option.
• I2C: A communication protocol used by some external devices and sensors. This option allows you to enable or disable the I2C module so you can use these devices.
• Serial: Allows you to enable or disable messages from the system on the serial interface. You most likely won’t need to change this unless you’re doing some kind of debugging.
• Audio: Allows you to select whether audio is sent via the onboard 3.5mm audio jack or via the HDMI port. It’s set to auto by default, which means your audio will be routed via HDMI only when an HDMI screen is connected.
• Update: From time to time, you may have to update Raspi-config. You’ll need an Internet connection to do this, but if you’re using a recently download distribution, you should be up to date.
✔ About raspi-config: This just describes what the Raspi-config tool does.
When you’re finished making your selections, press the right arrow key twice to get to the Finish option and press Enter. You may have to reboot your Raspberry Pi, depending on the options you’ve selected.
If you want to use Raspi-config later, you can start it by typing sudo raspi-config.