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 a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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

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 a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.