Raspberry Pi Projects For Dummies. Evans Jonathan

Чтение книги онлайн.

Читать онлайн книгу Raspberry Pi Projects For Dummies - Evans Jonathan страница 7

Raspberry Pi Projects For Dummies - Evans Jonathan

Скачать книгу

you have trouble connecting to the network, see your Internet service provider’s instructions for setting up new devices using DHCP on your home router. In rare cases, DHCP may be switched off.

      7. Connect your micro USB power supply to your power socket on the bottom-left corner of your board.

      Some power supplies have standard-size USB ports. You connect a USB–to–micro USB adapter cable from the standard USB output on these power adaptors to the micro USB input on your Raspberry Pi. There is no power switch. To cycle the power, you remove the adapter plug and put it back in, which is a little awkward. If you have an extension lead with a switch, you can connect your power adapter and use the switch on the lead to cycle to turn the power on and off more easily.

      warning Don’t connect your Raspberry Pi to your computer’s USB port via a USB–to–micro USB adapter cable. Your computer’s USB port isn’t designed to deliver enough power for your Raspberry Pi, via the USB port.

      When you power up your Raspberry Pi you should briefly see a rainbow-colored screen, which confirms that the hardware itself is working. Then the Linux operating system on your SD card will start to run and you’ll see an avalanche of text on your screen as all the various parts of the system are started. It can be pretty fun to watch. This will take a little time to complete. When it’s finished, you’ll be able to move on to setting up the system in the next section.

      You’ll also see a little status light on the board next to the audio jack. The PWR light should be on. When your Raspberry Pi accesses the SD card to load the operating system, you’ll see the ACT light activated.

      tip If you’re using an earlier Revision 1.0 board, the ACT light is labeled OK.

      The FDX light indicates that you have a good Ethernet connection. The LNK light will flash whenever there is network traffic on the wire. The 100 light indicates a high-speed (100 Mbit) Ethernet connection.

      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.

      •

Скачать книгу