Raspberry Pi Projects For Dummies. Evans Jonathan

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

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

Raspberry Pi Projects For Dummies - Evans Jonathan

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

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.

      Starting Up the Desktop Environment

      When you’ve finished configuring your Raspberry Pi with Raspi-config, you’re ready to start up. After you switch on your power, you may have to enter your username and password, depending on your settings. For Raspbian Wheezy, the username is pi and the password is raspberry. Make sure you type these in lowercase.

      After you log in, you’ll see the command prompt:

      pi@raspberrypi ~ $

      This means you’re up and running and you’ve logged into the operating system. Give yourself a cheer!

      It doesn’t like the graphical operating system you’re used to with a desktop computer, but the command line is the direct connection to your Raspberry Pi’s capabilities. You can execute all the main system commands and even do programming using only the command line interface. In a sense, the graphical environment is just a way of prettying up the command line and make it easier to use.

To get pretty, you launch the GUI, LXDE, by entering its startup command on the command line. To fire it up, type startx. It will take a moment or two to start up, and the screen will go blank for a bit. After startup, you should see the LXDE and a lovely red raspberry logo on the desktop wallpaper, as shown in Figure 1-6.

image

       Figure 1-6: Starting up the desktop environment.

      When you’ve got the desktop working, you can move on to learning about the programming tools in Chapter 3 or dive straight into the projects, if you’re familiar with programming.

      tip We recommend you peruse through Chapter 2 to make sure your workbench is set up for building the projects in this book. You’ll need a few tools to get going on many of them, and it’s a good idea to set up your workspace before you begin.

      Troubleshooting Your Raspberry Pi

      Things don’t always go according to plan. Here are some common problems and how you can try to solve them:

      ✔ No lights on your Raspberry Pi: This can happen if you forgot to connect the micro USB power connector or if the power supply isn’t capable of supplying your Raspberry Pi with enough power. Check that it’s rated to at least 5V 700mA (3.5 watts).

      ✔ Only the red light comes on: Your Raspberry Pi has power, but it can’t read the operating system on your SD card. First, make sure your SD card is firmly inserted. Then check that you’ve correctly created the disk image. If that doesn’t work, you can try testing your SD card on another Raspberry Pi to see if you get the same problem. If all else fails, try using a pre-imaged SD card.

      ✔ No output on the monitor: Check your monitor connection and your monitor’s power connection. Make sure that your monitor is turned on. (Sounds silly, but we’ve all done this at least once!) Then check that your monitor is using the correct input source. Use a button on the front of the monitor to cycle through them or use the monitor’s remote control.

      ✔ Inconsistent behavior or hang-ups: Your Raspberry Pi uses power at different amounts depending on what it’s doing. Make sure you have a good power supply and that it isn’t overtaxed.

      remember If you have a lot of peripherals connected to your Raspberry Pi, they may be demanding power as well. If your power supply is right at the limit of its capabilities and your processor needs extra power for computing-intensive tasks, it could exceed what’s available and cause your Raspberry Pi to hang. This is particularly common if you try to power your Raspberry Pi from a USB socket.

      If these tips don’t fix the problems you’re experiencing, your next port of call should be the user forums at the Raspberry Pi Foundation (www.raspberrypi.org/forums). The user community there is extremely knowledgeable and very helpful, particularly for beginners. Your problem may already have been solved in the discussions there. If not, post your problem, describing exactly the trouble you’re having. More often than not, you’ll get an answer within a few hours. Making it easy to experiment with your Raspberry Pi is what the user community is all about!

Chapter 2

      Setting Up Your Tools and Workbench

       In This Chapter

      ▶ Setting up a project-building workspace

      ▶ Choosing the right tools for the job

      ▶ Selecting your accessories

      ▶ Using breadboards and soldering

      ▶ Finding out about Raspberry Pi LEGO projects

      The first thing you need to do to get started with Raspberry Pi projects is to get your workspace ready. You need a dedicated work area and the right tools so that you can build the projects quickly and easily. In this chapter, we explain how to create a good workspace with the right set of tools for the projects in this book.

      The project chapters assume that you have the basic workspace and tools ready to go. After you dive into a project, it can be a drag to interrupt your work to get some basic tool that you’ve overlooked. But if you have most (or all) of the basics of your workspace covered, you won’t have to stop what you’re doing to go get a hand tool or run to the hardware store.

      Getting Ready to Build Your Projects

      You can start working on Raspberry Pi projects almost anywhere, but it’s best to have a dedicated spot in which to build them. Completing the projects will take some time, so you want to choose a place where you can work comfortably and see what you’re doing. Generally, setting up and taking down unfinished projects is a hassle – it takes more time and can introduce errors if your connections come loose. You can avoid this problem by setting aside a dedicated workspace.

       Setting up your workspace

You need a dedicated area where you can build and test your projects – especially the advanced ones in this book, which can take a few hours or more. You have to connect all the components together, provide power, keep the cables and connection wires organized, and do some light fabrication. So, find a spot in your house, apartment, shed, garage, studio, or wherever, where you and your work will be undisturbed and where you can make

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