Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arduino Robotic Projects
Arduino Robotic Projects

Arduino Robotic Projects: Build awesome and complex robots with the power of Arduino.

eBook
€19.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.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
Table of content icon View table of contents Preview book icon Preview Book

Arduino Robotic Projects

Chapter 1. Powering on Arduino

Welcome to the wonderful world of Arduino! This small but powerful processor board has become a staple with the robotic hobbyist community, and many have provided open source software to enhance its capabilities. Unfortunately, many, especially those new to embedded systems and programming, can end up so discouraged that the processor board can end up on the shelf gathering dust. The purpose of this first chapter is to help you decide which of the many different Arduinos is right for your application. Then, you'll walk through the steps to get your Arduino powered up and working so that you can begin working on all those amazing robotic projects you've always wanted to create.

Selecting the right Arduino board


Before we connect power and start programming, you'll need to decide which of the different Arduinos is right for your project.

A brief history of Arduino

First, let's understand a little history and a few definitions. Arduino began in 2005 with a few brave folks at a school in Italy deciding that providing a simple, inexpensive, easy-to-work-with hardware (HW) and software (SW) platform would be a wonderful endeavor so that their students could work on their own embedded systems projects. They started with the Atmel series of processors and then added four key elements.

First, they provided an easy-to-use hardware connection to the processor so that users didn't need to purchase expensive and difficult-to-use additional HW for this task. Initially, this connection was done via a serial port; now, it is almost universally done through USB.

Second, they provided a boot program (the program that runs when the processor powers on) that would configure the hardware and get the entire system to a known state so that users would have a standard set of hardware with which they can work. This also enables the contribution of the third key, which is the Arduino integrated development environment (IDE). It is a piece of SW that runs on a host computer and allows developers to develop their projects and then upload them easily to the target Arduino development board. The program can then be run, debugged, and modified through the IDE. Then, when the program is completed, you disconnect Arduino from the host system and it will run without any connection to the development system.

The last contribution is a set of Input/Output (I/O) pins in a standard configuration. This makes documentation easy, but more importantly, it has allowed for an entire set of additional capability to be provided by what are called shields. These shields fit on top of Arduino, plug directly into the pins, and are supported by a code library that allows the user to easily access the increased functionality.

Introducing the different versions of Arduino

Initially, there was only a single board, which made selection easy. However, as the community of Arduino users has grown, so have the many different needs for different sizes, capabilities, and form factors. There are now many different Arduino versions and even Arduino clones. There are also chips that allow you to create your very own Arduino-like systems. There are many well-known and popular versions of Arduino for you to consider for your project. However, they are too many to be listed and discussed here.

There are some that are very powerful but also have a much larger form factor and are more expensive. There are some that are extremely small and inexpensive, but they are somewhat limited in the size of programs and interfaces. Here are some of the most popular versions of Arduino.

Arduino Uno R3

Perhaps the current most popular version of Arduino is the Arduino Uno R3 (or Rev3). The following is an image of the unit:

Choosing the Arduino Uno R3

This is a standard choice for many Arduino projects. It has 32 KB of space for programs, which is a relatively adequate amount for most small-to medium-size programs. It has an ATmega328 processor running at 16 MHz and the standard Arduino set of I/O pins, 14 digital I/O pins, six analog inputs, and one serial communication port. It takes a USB A Male to B Male cable, as shown in the following image:

Arduino Mega 2560 R3

Another popular choice, especially when additional program space and programming power is needed, is the Arduino Mega 2560 R3. The following is an image of this Arduino:

Choosing the Arduino Mega

The Arduino Mega is Arduino of choice for larger projects that require more programming space, a more powerful processor, more I/O, or all of these. It uses an ATmega2560 processor, which runs programs faster than the ATmega328 processor. The biggest difference, perhaps, is the larger program size. It has a total of 256 KB of memory, which can store much larger programs than the standard Arduino Uno. It also has more analog and digital I/O pins.

Note

The add-on shields are boards that can fit on top of Arduino to add more functionalities. However, it is important to note that they are made to fit the Arduino Uno may not fit the Arduino Mega. For each shield you are considering, make sure it will work with your particular Arduino.

Spotting a counterfeit or clone

There is one more thing to note here. Where it says Mega, you'll notice that there is no Arduino trademark on the board. The Arduino team restricts the usage of its trademark for manufacturers that pay a license fee and work with the team to ensure quality. In this case, this board is almost assuredly not an official Arduino Mega. Go to http://arduino.cc/en/Products/Counterfeit#.UxkWsfldVHI to find out more about how to spot a counterfeit.

As the hardware for Arduino is also open source, some manufacturers take this design and provide new and different designs form factors. These are considered Arduino clones. You will need to rely on the quality of the manufacturers of these clones, so consider that before purchasing.

Arduino Due

If you need even more processing speed, the most powerful of all the Arduino lines is the Arduino Due. The following is an image of this product:

Choosing the Arduino Due

The Arduino Due is truly at the top of the line as far as processing power is concerned. This unit uses the AT91SAM3X8E7 processor, which is an ARM Cortex processor. It is the same type of processor that many cell phones use. It also offers 512 KB of memory and lots of analog and digital I/O pins. Shields that are made to fit the Arduino Mega or Uno often will fit the Arduino Due, but it is always good to check before purchase. For most starter projects, you'll not need the power of the Arduino Due.

Arduino Micro

If you need to go smaller, the Arduino line also offers opportunities with much smaller packages in a number of different form factors. One of the more popular units is the Arduino Micro. The Micro is a very small form factor; yet, it has a processor with the appropriate boot parameters so that you can run the Arduino IDE, the USB connector, and the exposed I/O pins, even though they are much fewer than those found in the Arduino Uno.

The following is an image of this unit:

Choosing the Arduino Micro

This unit comes with an ATmega328 processor, the same processor that comes with the Arduino Uno, but runs at half the clock rate. It comes with the same 32 KB of memory as the Uno but with much fewer I/O pins. For this unit, and the others that I will present here, you'll need to use a mini-USB B cable, as shown in the following image:

Adafruit FLORA

As noted earlier, as Arduino designs and parts are openly available, some companies have taken the standard Arduino and given it a different look. If you are looking for a much different form factor, you can try the Adafruit FLORA, offered by Adafruit at www.adafruit.com. The following is an image of this unit:

Choosing the Adafruit FLORA

The Adafruit FLORA is part of a wearable line of Arduino clone processors. It is 1.75 inches in diameter, but still has the USB connection, connectivity to the Arduino IDE, and exposed pins, but much fewer than any of the other Arduinos we have discussed. It uses the Atmega32u4 processor and also uses a mini-USB B cable.

Adafruit Gemma

If you like the FLORA form factor but want something even smaller, you can purchase the Gemma from Adafruit. In the following image, this unit is on the right-hand side of the FLORA:

Choosing the Adafruit Gemma

Amazingly, the Adafruit Gemma still has the USB connector, uses the same Arduino IDE, and has some I/O pins still available. As it has an ATtiny85 processor running at 8 MHz, only 8 KB of memory, and far fewer I/O pins, it can only be used in limited applications. However, it is an interesting form factor.

Adafruit Trinket

Finally, another small form factor Arduino from Adafruit is the Trinket. The following is an image of it with the FLORA and Gemma in the background:

Choosing the Adafruit Trinket

The trinket is very similar in performance with the Gemma, with the same processor, memory, and I/O.

Other options with Arduino

There are also other possible Arduino configurations. As you can purchase a chip that has the Arduino processor and Boot ROM configuration, you can build a custom Arduino configuration. The http://www.instructables.com/id/Paperduino-20-with-Circuit-Scribe/ website even shows you how to print your own Arduino circuit on paper.

Powering up Arduino


There is nothing as exciting as ordering and finally receiving a new piece of hardware; yet, things can go poorly even in the first few minutes. This chapter will hopefully help you avoid the pitfalls that normally accompany unpacking and configuring your Arduino. We'll step through the process, answer many of the different questions you might have, and help you understand what is going on. If you don't get through this chapter, you'll not be successful at any of the others, and your HW will go unused, which would be a real tragedy. So, let's get started.

One of the most challenging aspects of writing this guide is to decide to what level I should describe each step. Some of you are beginners, others may have some limited experience, and others will know significantly more in some of these areas. I'll try to be brief but still detail the steps to take in order to be successful.

The items you'll need for this chapter's projects are as follows:

  • An Arduino

  • A USB cable to go between your Arduino and the host computer

  • A host computer running a Windows, Mac, or Linux operating system

Unveiling your Arduino

Before plugging anything in, inspect the board for any issues that might have occurred during shipping. This is normally not a problem, but it is always good to do a quick visual inspection. You should also acquaint yourself with the different connections on the board. In the following image, the connections on the board are labelled for your information:

The Arduino Mega is very similar; it just has more I/O pins. However, the FLORA is a bit different. The following image shows the connections:

Connecting to Arduino

Before you connect the board, download the appropriate SW for your computer (Windows, Mac, or Linux from http://arduino.cc/en/main/software#.UxoUA_ldUvs). Install the SW by following the instructions for your board and operating system. This will also install the drivers for the board. Then, connect the board to the computer. To do this, you'll need to go through the USB-client connection. This is achieved by performing the following steps:

  1. Connect the USB connector end of the cable to the board.

  2. Connect the other end of the USB connector to the USB port of the PC.

When you plug the board in, the PWR LED should constantly be green. The following image shows the location of the LED so that you're certain which one to look for:

The Arduino Uno is also preloaded with a simple blink program; the yellow LED should also be turning on and off every second. The Mega will look very similar to the Arduino Uno.

Installing the FLORA IDE

If you are using the FLORA Arduino, you should get your Arduino IDE from http://learn.adafruit.com/getting-started-with-flora/download-software. Unzip the file and place it in a directory where you can get to it later. Then, use the USB cable to connect the device to the computer. When the device is connected, it should look like the following image when powered on:

Don't worry yet about the blinking red LED; I'll explain this in Chapter 2, Getting Started with the Arduino IDE.

Summary


Congratulations! You've completed the first stage of your journey. If you haven't purchased your Arduino yet, feel free to go out and start your Arduino experience. If you have, you should have your Arduino up and working. No gathering dust in the bin for this piece of hardware. It is now ready to start connecting to all sorts of interesting devices in all sorts of interesting ways.

Your system has lots of capabilities. Your next step will be learning how to bring up the Arduino IDE so that you can start doing all sorts of amazing things with your Arduino.

Left arrow icon Right arrow icon

What you will learn

  • Acquaint yourself with the many different kinds of Arduinos to choose the right Arduino for your application Start to use your Arduino by unboxing, powering-up, and configuring the device Tweak Arduino to make wheels, or legs, move so that your robot can be mobile Add GPS to your projects so your robots can know where they are Use RF signals to control your robot remotely Connect your robot to a display so you can see what it is thinking Build more complex robots that can move, swim, or fly
Estimated delivery fee Deliver to Germany

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 14, 2014
Length: 240 pages
Edition :
Language : English
ISBN-13 : 9781783989829
Vendor :
Arduino
Category :
Languages :
Tools :

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
Estimated delivery fee Deliver to Germany

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Aug 14, 2014
Length: 240 pages
Edition :
Language : English
ISBN-13 : 9781783989829
Vendor :
Arduino
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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
€264.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 57.98
Arduino Robotic Projects
€37.99
Arduino Home Automation Projects
€19.99
Total 57.98 Stars icon

Table of Contents

14 Chapters
Powering on Arduino Chevron down icon Chevron up icon
Getting Started with the Arduino IDE Chevron down icon Chevron up icon
Simple Programming Concepts Using the Arduino IDE Chevron down icon Chevron up icon
Accessing the GPIO Pins Chevron down icon Chevron up icon
Working with Displays Chevron down icon Chevron up icon
Controlling DC Motors Chevron down icon Chevron up icon
Controlling Servos with Arduino Chevron down icon Chevron up icon
Avoiding Obstacles Using Sensors Chevron down icon Chevron up icon
Even More Useful Sensors Chevron down icon Chevron up icon
Going Truly Mobile – the Remote Control of Your Robot Chevron down icon Chevron up icon
Using a GPS Device with Arduino Chevron down icon Chevron up icon
Taking Your Robot to Sea Chevron down icon Chevron up icon
Robots That Can Fly Chevron down icon Chevron up icon
Small Projects with Arduino Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(10 Ratings)
5 star 60%
4 star 20%
3 star 10%
2 star 10%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Dec 08, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
handy reference
Amazon Verified review Amazon
bala Jul 07, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
nice bookexcellent explanations
Amazon Verified review Amazon
Francis Perea Feb 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It is a very comprehensive book that includes all kind of devices that you can plug into your Arduino for every robotic project you could develop.It is plenty of diagrams, pictures and code samples.It even includes two chapters for sailing and flying robots.Definitely a must read if you plan to build Arduino based robots.
Amazon Verified review Amazon
Norbert Varga Jan 31, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The title should be “Learning Arduino” or something like this because this is the best book I’ve read so far for beginners who want to learn Arduino. The chapters are well-written, everything is clearly explained, images and source code examples are great. The book’s structure is wise and covers everything from choosing an Arduino board to connecting to a Wi-Fi network, using sensors or controlling servos and DC motors. If you want to learn Arduino, don’t hesitate, get this book.
Amazon Verified review Amazon
José Geraldo de Pontes e Souza Jul 01, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The reading is easy and I got to use the examples to solve practical problems.I recommend that product to the technicians and hobbies.
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