Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Raspberry Pi Robotic Projects
Raspberry Pi Robotic Projects

Raspberry Pi Robotic Projects: Work through a mix of amazing robotic projects using the Raspberry Pi Zero or the Raspberry Pi 3 , Third Edition

Arrow left icon
Profile Icon Jon Witts Profile Icon Richard Grimmett
Arrow right icon
£32.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (3 Ratings)
Paperback Oct 2016 238 pages 3rd Edition
eBook
£7.99 £25.99
Paperback
£32.99
Subscription
Free Trial
Renews at £16.99p/m
Arrow left icon
Profile Icon Jon Witts Profile Icon Richard Grimmett
Arrow right icon
£32.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (3 Ratings)
Paperback Oct 2016 238 pages 3rd Edition
eBook
£7.99 £25.99
Paperback
£32.99
Subscription
Free Trial
Renews at £16.99p/m
eBook
£7.99 £25.99
Paperback
£32.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Raspberry Pi Robotic Projects

Chapter 1. Getting Started with the Raspberry Pi

Welcome to the exciting world of Raspberry Pi! Since its introduction just a few years ago, it has gained a huge following of Do-It-Yourselfers, who use the small but versatile processor family to build a wide variety of projects, and for good reason. The entire set of Raspberry Pi offers a range of solid performance at a low cost. With the addition of inexpensive additional hardware and free, open source software, the Raspberry Pi can be used to produce a wide range of projects, including robots that can roll, walk, fly, and swim.

The Raspberry Pi can do amazing things, but first you'll need to understand how to access all of this capability. In this chapter, you'll learn about the following subjects:

  • Providing power to the board

  • Connecting a display, keyboard, and mouse

  • Loading and configuring the operating system

  • Configuring the board for remote access

There are several versions of the Raspberry Pi, but there are two versions that you can choose to do the projects in this book. The first is the Raspberry Pi Zero, the smallest and least expensive of the Raspberry Pi processor boards. It boasts a Broadcom BCM2835 application processor that features a 1 GHz ARM11 core and 512MB of LPDDR2 SDRAM. The board also has a microSD card slot, a mini HDMI socket for 1080p60 video output, micro USB sockets for data and power, and a 40-pin GPIO header in a small form factor.

The other choice is the Raspberry Pi 3, a slightly larger version, but with higher performance and more hardware connections built right into the board. The Raspberry Pi 3 offers a 1.2 GHz 64-bit quad-core ARM Cortex-A53 CPU (~3 x the performance of the Raspberry Pi Zero). In contrast to the Raspberry Pi Zero, it has a built-in microSD card slot, a standard HDMI socket for 1080p60 video output, a micro USB socket for power, a built-in four-port USB connector, and a 40-pin GPIO header. It also provides Integrated 802.11n wireless LAN and Bluetooth 4.1. If you are not sure which board is right for you, it may make sense to read through this chapter, see how to power up and configure both, and then decide which is right for you.

Setting up the Raspberry Pi 3


The Raspberry Pi 3, with more hardware available as part of the standard product, is similar, but a bit easier to configure, than the Raspberry Pi Zero, since almost all the hardware you need is available right on the Raspberry Pi 3.

Here are the items you'll need to set up the Raspberry Pi 3:

  • A Raspberry Pi 3

  • A micro USB cable and power supply to provide power to the board

  • A display with an HDMI video input

  • A keyboard and mouse

  • A micro SD card - with at least 4 GB capacity

  • A micro SD card writer

  • Another computer that is connected to the Internet

Before you get started, let's get familiar with the Raspberry Pi 3. Here is an image of the hardware:

Here are the connections labeled for your information:

One of the first things you'll need to do is provide power for the board.

Powering the board


One of the first issues you'll want to consider is how to power the board. To do this, you need to connect through the USB power connection. There are two choices for providing power to the Raspberry Pi Zero:

  1. Connect the micro USB connector labeled power to a 5V DC source powered by a USB power supply. This can be either a power supply that can plug directly into an outlet, or power supplied by a powered USB port such as those available on most computers.

  2. Connect the micro USB connector to a battery. The simplest type of connection is to a battery that has a USB connector, like those used to charge cellphones. Here is an image of just such a battery:

In both cases, make sure that the unit can supply enough current. You'll need a supply that can provide at least 1000 mA at 5V. Do not plug in the board just yet; you first need to connect the rest of the hardware and configure the micro SD card. However, you are now ready to connect the rest of the hardware.

Hooking up a keyboard, mouse, and display


The next step is to connect a keyboard, mouse, and display to the Raspberry Pi 3. For the Raspberry Pi 3, this is very straightforward: simply plug the USB connectors of the keyboard and mouse into one of the four USB connectors on the Raspberry Pi 3.

Now, you'll also need a display. There are a number of different video standards; here is an image of some of the most common ones, for reference:

There is an HDMI connector on the Raspberry Pi 3. You can connect directly to an HDMI display using an HDMI cable. If your display has a DVI connector, you can purchase an HDMI to DVI cable.

You are almost ready to plug in the Raspberry Pi 3. Even though your hardware configuration is complete, you'll still need to complete the next section to power on the device. So, let's figure out how to install an operating system.

Installing the operating system


Now that your hardware is ready, you need to download and image an operating system to a microSD card. The Raspberry Pi 3 provides a lot of different choices. You'll stick with Linux, an open source version of Unix, on your Raspberry Pi 3. Linux, unlike Windows, Android, or iOS, is not tightly controlled by a single company. It is a grassroots effort from a wide community, mostly open source and, while it is available for free, it grows and develops a bit more chaotically.

A number of different versions of Linux have emerged, each built on a core set of similar capabilities referred to as the Linux kernel. These core capabilities are all based on the Linux specification. However, they are packaged slightly differently, and developed, supported, and packaged by different organizations. The Raspberry Pi community has become standardized on Raspbian, a Debian distribution of Linux for the Raspberry Pi. So, you are going to install and run Raspbian on your Raspberry Pi 3.

The newest version of Debian is called Jessie, after the cowgirl in Toy Story. This is the naming convention for Debian, and you need to download this version of Raspbian.

You can purchase a card that has Raspbian installed, or you can download it onto your personal computer and then install it on the card. To download a distribution, you need to decide if you are going to use a Windows computer to download and create an SD card, a MAC OS X, or a Linux machine. Here are the steps for Windows and Linux machines:

  1. Firstly, you need to download an image. This part of the process is similar for both Windows and Linux. Open a browser window, go to the Raspberry Pi Foundation's website, https://www.raspberrypi.org/, and select the Downloads selection at the top of the page. This will give you a variety of download choices. Go to the Raspbian section, and select the .zip file just to the right of the image identifier. You need the latest version, but not the lite one. This will download an archived file that has the image for your Raspbian operating system. Note the default username and password; you'll need them later.

  2. If you're using Windows, you'll need to unzip the file using an archiving program such as 7-Zip, available at http://www.7-zip.org/. This will leave you with a file that has the .img extension—a file that can be imaged onto your card. Next, you need a program that can write the image to the card. I use Image Writer for Windows. You can find a link to this program at the top of the download section on the http://www.raspberrypi.org website.

    Plug your card into the PC, run this program, and you should see the following:

  3. Select the device card and the image you downloaded earlier; it should look something like the following screenshot:

  4. Click on the Write button. This will take some time, perhaps as long as 15 minutes. When it is complete, exit the program and you'll have your microSD card with the image.

  5. If you are using Linux, you need to unarchive the file and then write it to the card. You can do all of this with one command. However, you do need to find the /dev device label for your card. You can do this with the ls -la /dev/sd* command. If you run this before you plug in your card, you might see something like the following screenshot:

  6. After plugging in your card, you might see something like the following screenshot:

  7. Note that your card is at sdb. Now, go to the directory in which you downloaded the archived image file and use the following command:

    sudo dd if=2015-11-21-raspbian-jessie.img  of=/dev/sdX
    
  8. The 2015-11-21-raspbian-jessie.img command will be replaced by the image file that you downloaded and /dev/sdX will be replaced by your card ID, in this example, /dev/sdb. Be careful to specify the correct device, as this can overwrite the data on any of your drives. Also, this may take a few minutes. Once the file is written, eject the card, and you are ready to plug it into the board and apply the power.

Now that you have completed those steps, make sure that your Raspberry Pi 3 is unplugged and install the SD card into the slot. Then power the device. After the device boots, you should get the following screen:

You are up and running!

Note

If you are using a US keyboard, you may need to edit the keyboard file for your keyboard to use nano effectively. To do this, use the drop-down menu in the upper left-hand corner of the screen, choose Preferences | Mouse and Keyboard Settings, and then select the Keyboard tab. You can then choose the correct keyboard for your configuration.

Now you are ready to start interacting with the system! You can bring up a Terminal window and start typing commands.

Adding Internet access


The Raspberry Pi 3 has a standard LAN connector. To connect the Raspberry Pi 3, simply plug it into an active LAN. The Raspberry Pi also has built-in WLAN capability. If you are going to connect wirelessly, make sure that you have a wireless access point available. You can then use the Raspberry Pi's Wireless LAN manager to connect. To do this, select the LAN manager icon in the upper right-hand corner of the graphical user interface (GUI):

You can then select the network you wish to connect to. Enter your password and you should be connected.

Accessing your Raspberry Pi 3 from your host PC

Once you have established an Internet network connection with your device, you can access it from your host computer. There are three ways to access your system from your remote computer:

  1. The first is through a Terminal interface called SSH.

  2. The second way is by using a program called VNC server. This allows you to open a graphical user interface remotely, which mirrors the graphical user interface on the Raspberry Pi 3.

  3. Finally, you can transfer files through a program called WinSCP, which is custom-made for this purpose. You can use a program called scp for Linux.

So firstly, make sure that your basic system is up and working. Open a Terminal window and check the IP address of your unit. You're going to need this, however, you communicate with the system. Do this by using the ifconfig command. It should produce what is shown in the following screenshot:

You need inet addr to contact your board through the Ethernet. If you are using a wireless device to gain access to the Internet, your wireless router will set the IPv4addr shown in the wlan0 section of this information. You also need an SSH terminal program running on your remote computer. An SSH terminal is a Secure Shell (SSH) connection, which simply means that you'll be able to access your board and give it commands by typing them into your remote computer. The response from the Raspberry Pi 3 will appear in the remote computer's Terminal window.

Note

If you'd like to know more about SSH, visit https://www.siteground.com/tutorials/ssh/.

If you are running Microsoft Windows, you can download an alternative application. My personal favorite is PuTTY. It is free and does a very good job of saving your configuration so that you don't have to type it in every time. Type putty in a search engine and you'll soon come to a page that supports a download. Alternatively, you can go to http://www.putty.org.

Download PuTTY to your Microsoft Windows machine. Then, run putty.exe. You should see a configuration window that looks something like the following screenshot:

Type the inet addr from the previous page in the Host Name space and make sure that the SSH selection is selected. You may want to save this configuration under Raspberry Pi so that you can reload it each time.

When you click on the Open button, the system will try to open a Terminal window onto your Raspberry Pi through the LAN connection. The first time you do this, you will get a warning about an RSA key, as the two computers don't know about each other. Windows therefore, complains that a computer that it doesn't know is about to be connected in a fairly intimate way. Simply click on the OK button and you should get a Terminal with a login prompt, as shown in the following screenshot:

Now you can log in and issue commands to your Raspberry Pi. If you'd like to do this from a Linux machine, the process is even simpler. Bring up a Terminal window and then type ssh pi@xxx.xxx.xxx.xxx, where xxx.xxx.xxx.xxx is the inet addr of your device. This will then bring you to the login screen of your Raspberry Pi, which should look similar to the preceding screenshot.

SSH is a really useful tool to communicate with your Raspberry Pi. However, sometimes you need a graphical look at your system and you don't necessarily want to connect to a display. You can get this on your remote computer by using an application called vncserver. You'll need to install a version of this on your Raspberry Pi by typing sudo apt-get install tightvncserver in a Terminal window on your Raspberry Pi. This is a perfect opportunity to use SSH, by the way.

Tightvncserver is an application that allows you to view your complete Raspberry Pi. Once you have it installed, you need to start the server by typing vncserver in a Terminal window on the Raspberry Pi. You will be prompted for a password and password verification, and then you will be asked if you'd like to have a view-only password. Remember the password that you entered-you'll need it to log in via VNC Viewer remotely.

You need a VNC Viewer application for your remote computer. On my Windows system, I use an application called RealVNC. When I start the application, it gives me the following:

Enter the VNC Server address, which is the IP address of your Raspberry Pi, and click on Connect. You will see a pop-up window, as shown in the following screenshot:

Type in the password that you just entered while starting vncserver. You should then get a graphical view of your Raspberry Pi that looks like the following screenshot:

You can now access all of the capabilities of your system, although they may be slower if you are doing a graphics-intensive data transfer.

Note

There are ways to make vncserver start automatically on boot. I have not used them; I prefer to type the vncserver command from an SSH application when I want the application running. This keeps your running applications to a minimum and, more importantly, presents fewer security risks. If you want to start yours each time you boot, there are several places on the Internet that show you how to configure this. Try the following website: http://www.havetheknowhow.com/Configure-the-server/Run-VNC-on-boot.html

To view this Raspberry Pi desktop from a remote Linux computer running Ubuntu, for example, you can type sudo apt-get install xtightvncviewer and then start it by using xtightvncviewer 10.25.155.110:1 and supplying the chosen password.

Linux has viewers with graphical interfaces such as Remmina Remote Desktop Client (select the VNC-Virtual Network Computing protocol), which might be used instead of xtightvncviewer. Here is a screenshot of the Remote Desktop Viewer:

Make sure that vncserver is running on the Raspberry Pi. The easiest way to do this is to log in using SSH and run vncserver at the prompt. Now, click Connect on the Remote Desktop Viewer. Fill in the screen as follows; in the Protocol selection, choose VNC, and you should see the following:

Now, enter the Host Internet address, making sure that you include a :1 at the end, and then click on Connect. You'll need to enter the vncserver password you set up, as shown in the following screenshot:

Now you should be able to see the graphical screen of the Raspberry Pi. To access the Raspberry Pi graphically from a Mac or other Apple device, you can still use RealVNC Viewer. See https://www.realvnc.com/products/ for more information.

The final piece of software that I like to use with Windows is a free application called WinSCP. To download and install this piece of software, go to https://winscp.net/ and follow the instructions to download and install. Once installed, run the program. It will open the following dialog box:

Click on New and you will get the following:

Here, you fill in the IP address in the host name tab, pi in the user name tab, and the password (not the vncserver password) in the password space. Click on Login and you should see a warning displayed, as shown in the following screenshot:

The host computer, again, doesn't know the remote computer. Click on Yes and the application will display the following:

Now, you can drag and drop files from one system to the other. You can also do similar things with Linux by using the command line. To transfer a file to the remote Raspberry Pi, you can use the scp file user@host.domain:path command, where file is the filename, and user@host.domain:path is the location you want to copy it to. For example, if you wanted to copy example.py from your Linux system to the Raspberry Pi, you would type scp example.py pi@10.25.155.176:/home/pi/. The system will ask you for the remote password, which is the login for the Raspberry Pi. Enter the password and the file will be transferred.

Now that you know how to use ssh, tightvncserver and scp, you can access your Raspberry Pi remotely without having a display, keyboard, or mouse connected to it.

You only need to connect the power and the LAN, either with a cable or through wireless LAN. If you need to issue simple commands, connect through SSH. If you need a more complete set of graphical functionality, you can access this through vncserver. Finally, if you want to transfer files back and forth, you can use WinSCP from a Windows computer, or scp from a Linux computer. Now you have the toolkit to build your first functionality. You can also use scp on a Mac. Here is a link for more information: https://research.csc.fi/csc-guide-copying-files-from-linux-and-mac-osx-machines-with-scp.

One of the challenges of accessing the system remotely is that you need to know the IP address of your board. If you have the board connected to a keyboard and display, you can always just run the ifconfig command to get this information. However, you're going to use the board in applications in which you don't have this information. There is a way to discover this by using an IP scanner application. There are several available for free; on Windows, I use an application called Advanced IP Scanner, available at .

When you start the program, it looks like the following screenshot:

Clicking on the Scan selector scans for all the devices connected to the network. You can also do this in Linux; one application for IP scanning in Linux is called Nmap. To install Nmap, type sudo apt-get install nmap. To run Nmap, type sudo nmap -sp 10.25.155.1/154 and the scanner will scan the addresses from 10.25.155.1 to 10.25.155.154.

These scanners let you know which addresses are being used, and this should allow you to see your Raspberry Pi address without typing ipconfig. Your system has lots of capabilities. Feel free to play around with the system—try to get an understanding of what is already there and what you'll need to add from a software perspective.

Setting up the Raspberry Pi Zero


While the Raspberry Pi Zero is a powerful computer, you'll need some additional hardware to access this capability. Here are the items you'll need to set up the Raspberry Pi Zero:

  • A Raspberry Pi Zero

  • A micro USB cable and power supply to provide power to the board

  • A display with an HDMI video input

  • A keyboard, a mouse, and a powered USB hub

  • A micro SD card - with at least 4 GB capacity

  • A micro SD card writer

  • Another computer that is connected to the Internet

  • A WLAN USB dongle

  • A 40x2 pin connector strip

Before you get started, let's get familiar with the Raspberry Pi Zero. Here is an image of the hardware:

Note that the GPIO pin male headers are not pre-soldered to the board; you'll want to do that. You can buy these at most online electronics retailers. You should also become familiar with the various connections on the board. Here, you can see the Raspberry Pi Zero with the connector soldered and the connections labeled for your information:

Powering the board


One of the first issues you'll want to consider is how to power the board. To do this, you need to connect through the USB power connection. The same two choices are available to power the Raspberry Pi Zero as the Raspberry Pi 3. However, you'll need to power the USB hub as well, so make sure you take that into account in your power choices.

Hooking up a keyboard, mouse, and display


The next step is to connect a keyboard, mouse, and display to the Raspberry Pi Zero. To connect any device to the Raspberry Pi Zero, you'll need some sort of adapter or hub. You can buy a simple hub, which goes from the micro USB connector on the Raspberry Pi Zero to the more common standard connector. You can find these at most online electronics retailers, and it looks something like the following:

However, there will be projects when you will want to connect more than one device to the Raspberry Pi Zero. For these cases, you may want to consider purchasing a powered USB hub. Before deciding on the hub to connect to your board, you need to understand the difference between a powered USB hub and one that gets its power from the USB port itself.

Almost all USB hubs are unpowered. In other words, you don't plug in the USB hub separately. The reason for this is that almost all of these hubs are hooked up to computers with very large power supplies, and powering USB devices from the computer is not a problem. This is not the case for your board. The USB port on your board has very limited power capabilities, so if you are going to hook up devices that require significant power—a WAN adapter or a webcam, for instance—you're going to need a powered USB hub, one that provides power to the devices through a separate power source. Here is an image of such a device, available at http://www.amazon.com and other online retailers:

Note that there are two connections on this hub. The one to the far right is a power connection, which will be plugged into a battery or a USB power adapter with a USB port. The connection to the left is the USB connection, which will be plugged into the Raspberry Pi. To connect the powered USB board to the Raspberry Pi Zero, you need a cable that connects to a micro USB connector. Now, you'll have more connections to add a mouse and keyboard, webcams, and a USB WLAN device.

Now, you'll also need a display. There is a mini HDMI connector on the Raspberry Pi Zero. In order to connect it to an HDMI monitor, you'll need a mini HDMI to standard HDMI adapter or cable. You can also buy a cable that has a mini HDMI connector on one end and a regular HDMI connector on the other. Here is an image of the adapter:

To use this adapter, simply connect it to your Raspberry Pi Zero, then connect the cable with the regular HDMI connections to the adapter and your TV or monitor that has an HDMI input connector. As with the Raspberry Pi 3, you can also buy a cable that goes from mini HDMI to DVI.

So, connect your HDMI cable to your monitor and the Raspberry Pi Zero. Connect your USB hub to the Raspberry Pi Zero and connect your keyboard and mouse to the USB hub. Make sure that you connect all your devices before you power on the unit. Most operating systems support the hot-swap of devices, which means you are able to connect a device after the system has been powered on, but this is a bit shaky. You should always cycle power when you connect new hardware. Here is a picture of everything connected:

The USB connectors are connected to USB power adapters. Even though your hardware configuration is complete, you'll still need to complete the next section to power on the device. So, let's figure out how to install an operating system.

Installing the operating system


You'll create a micro SD card with the appropriate operating system, following the same instructions as for the Raspberry Pi 3. Make sure that your Raspberry Pi Zero is unplugged and install the SD card into the slot. Then power on the device. After the device boots, you should get the following screen:

You are up and running!

Note

Note that if you use a powered USB hub, it might provide enough power to your Raspberry Pi. However, in some circumstances, it might not be able to provide all the power you need. I strongly suggest you use different power sources—one for your Raspberry Pi Zero and one for your hub.

You should be ready to bring up a Terminal window and start typing commands.

Adding Internet access


Unlike the Raspberry Pi 3, the Raspberry Pi Zero does not have a LAN connection. To connect the Raspberry Pi Zero to the Internet, you have two choices. You can establish a wireless LAN connection, or you can connect by using a USB to LAN adapter if you want to connect to an actual LAN port. Let's look at both of these possibilities.

If you are going to connect wirelessly, make sure that you have a wireless access point available. You'll also need a wireless device. The official Raspberry Pi Foundation markets a device itself, but other brands also work.

See http://elinux.org/RPi_USB_Wi-Fi_Adapters to identify which wireless devices have been verified to work with the Raspberry Pi Zero. Here is one that is available at many online electronics outlets:

You'll also need to connect a powered USB hub for this process so that you can access both the keyboard and mouse, as well as the USB wireless LAN device. Now, connect the device to the powered hub.

Boot the system and then edit the wpa_supplicant.conf file by typing sudo nano /etc/wpa_supplicant/wpa_supplicant.conf. You need to change it to look like the following:

The wpa-ssid and wpa-psk values here must, of course, match what your wireless access point requires. Reboot and your device should be connected to your wireless network. You'll know if it is connected by looking in the upper right-hand corner of the screen, where you should see the following:

You can now download any additional functionality you want to install from the Internet.

If you want to connect to an actual LAN cabled connection, you need a device that goes from USB to LAN. This site, http://elinux.org/RPi_USB_Ethernet_adapters, lists a number of different possibilities. The following is an image of one such device:

Connecting the Raspberry Pi Zero in this way is actually amazingly easy. Simply plug the USB to LAN adapter into the powered USB hub, connect an active LAN cable, and you should have Internet access. You can then follow the same instructions as for the Raspberry Pi 3 to access your Raspberry Pi from your host PC.

Now that you know how to use ssh, tightvncserver, and scp, you can access your Raspberry Pi remotely without having a display, keyboard, or mouse connected to it! If you are connecting via a WLAN connection, your system will now look like the following:

Now you can access your Raspberry Pi Zero remotely. As with the Raspberry Pi 3, you can use either the ifconfig command or Advanced IP Scanner to get the IP address of your Raspberry Pi Zero.

Summary


Congratulations! You've completed the first stage of your journey. You have your Raspberry Pi, either a 3 or a Zero, up and working. You have installed a Raspbian operating system, learned how to connect all the appropriate peripherals, and even mastered how to access the system remotely so that the only connections you need are a power supply cable and a LAN cable.

Now you are ready to start commanding your Raspberry Pi to do something. In the next chapter, you will be introduced to resources ranging including open source software and inexpensive hardware, and start to build your robotics projects. For the first project, you'll be building your very own R2D2.

Left arrow icon Right arrow icon

Key benefits

  • Easy to follow instructions, yet the ones that help you build powerful robots, and exclusive coverage of mobile robots with the Pi Zero
  • Build robots that can run, swim and fly and the cutting-edge dimension of robotics that is possible with the Raspberry Pi Zero and Pi 3
  • Interact with your projects wirelessly and make sci-fi possible, right in your home

Description

This book will allow you to take full advantage of Raspberry Pi Zero and Raspberry Pi 3 by building both simple and complex robotic projects. The book takes a mission-critical approach to show you how to build amazing robots and helps you decide which board to use for which type of robot. The book puts a special emphasis on designing mobile (or movable) robots using the Raspberry Pi Zero. The projects will show inexpensive, yet powerful, ways to take full advantage. It will teach you how to program Raspberry Pi, control the movement of your robot, and add features to your robots.

Who is this book for?

This book is for hobbyists and programmers who are excited about using the Raspberry Pi 3 and Raspberry Pi Zero. It is for those who are taking their first steps towards using these devices to control hardware and software and write simple programs that enable amazing projects. No programming experience is required, Just a little computer and mechanical aptitude and the desire to build some interesting projects.

What you will learn

  • Control a variety of different DC motors
  • Add a USB webcam to see what your robot can see
  • Attach a projector to project information
  • Insert USB control hardware to control a complex robot with two legs
  • Include speech recognition so that your projects can receive commands
  • Add speech output to that the robot can communicate with the world around it
  • Include wireless communication so that you can see what the robot is seeing and control the robot from a distance
Estimated delivery fee Deliver to Great Britain

Standard delivery 1 - 4 business days

£4.95

Premium delivery 1 - 4 business days

£7.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 17, 2016
Length: 238 pages
Edition : 3rd
Language : English
ISBN-13 : 9781786467966
Category :
Languages :
Concepts :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Great Britain

Standard delivery 1 - 4 business days

£4.95

Premium delivery 1 - 4 business days

£7.95
(Includes tracking information)

Product Details

Publication date : Oct 17, 2016
Length: 238 pages
Edition : 3rd
Language : English
ISBN-13 : 9781786467966
Category :
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 126.97
Raspberry Pi Robotic Projects
£32.99
Raspberry Pi for  Python Programmers  Cookbook
£36.99
Raspberry Pi: Amazing Projects from Scratch
£56.99
Total £ 126.97 Stars icon
Banner background image

Table of Contents

7 Chapters
Getting Started with the Raspberry Pi Chevron down icon Chevron up icon
Building Your Own Futuristic Robot Chevron down icon Chevron up icon
Building a Wall-E Robot Chevron down icon Chevron up icon
Building a Robotic Fish Chevron down icon Chevron up icon
Creating a Robotic Hand with the Raspberry Pi Chevron down icon Chevron up icon
A Self-Balancing Robot Chevron down icon Chevron up icon
Adding the Raspberry Pi to a Quadcopter Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(3 Ratings)
5 star 66.7%
4 star 0%
3 star 0%
2 star 33.3%
1 star 0%
Amazon Customer Oct 03, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great wealth of information.
Amazon Verified review Amazon
Thomas L. Jun 01, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really like the way this book is organized. It gives all of the information that would be needed for the projects described inside, among which are an interactive R2-D2, Wall-E, and others. If you have some previous experience with the pi, building these projects shouldn't be a problem. It gives a nice overview of a lot of different, modern tools that can be used on the platform. I'm using the information on Pocketsphinx (voice control), for example, right now in a separate project, and can say that it provides information much more concisely and effectively than online resources and addresses issues that are specific to implementation on a pi. For specific issues related to my project, I can still search out what I need online, but this book gives a great foundation. I highly recommend this book for those looking for a great overview of many of the current software and hardware tools that can be used on the raspberry pi and other GNU/Linux systems.
Amazon Verified review Amazon
Al Swanson Nov 28, 2016
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I was very excited to get this book based on the description. I did note there were very few reviews for the two earlier editions (especially given the huge numbers of pi's out there) but I know not everyone writes reviews and not everyone is going to use their Pi for robotics. I was also confident because, after all, this was the 3rd edition.The promise of the description is not kept in the content. The promise of using a Kinect for vision? Somehow the author felt that was kept in five pages. Do this, do this, do that. Almost nothing inn terms of explanation and certainly nothing in the way of troubleshooting. If it doesn't work with the instructions (in other words, if the code supplied that you type in) didn't work - don't expect ANY help.True, the description includes the fact that it's less than 200 pages. Even basic OpenCV books run multiple hundreds of pages with no robotics thrown in. So, bad on me.The other issue is that it's from Packt publishers. This company is just a small step above the Kindle Unlimited tech titles. Whether they are self publishers or just completely lacking in any sort of author assistance, I don't know. Some titles are excellent and often they are the only publisher offering books on recent tech subjects. But many titles are put out with little or no editing. Many are released with, like this one, false or (like here) misleading descriptions. Often the English is so poor as to make the book unusable. Poor translations might work for some subjects but not for tech.Not to mention the prices for Packt titles are usually absurdly high for what you get.I checked out the sample chapter on kindle for this book, but like all Packt books, that means you get the table of contents.In this case, I'm surprised because I've read some of the author's work and it's usually high quality. Not sure if this is for the bucks or was rushed, but no way does it fulfill the promise of the description. I'm very disappointed.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela