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
Free Learning
Arrow right icon
Arduino Android Blueprints
Arduino Android Blueprints

Arduino Android Blueprints: Get the best out of Arduino by interfacing it with Android to create engaging interactive projects

Arrow left icon
Profile Icon Marco Schwartz Profile Icon Stefan Buttigieg
Arrow right icon
zł197.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8 (4 Ratings)
Paperback Dec 2014 250 pages 1st Edition
eBook
zł39.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial
Arrow left icon
Profile Icon Marco Schwartz Profile Icon Stefan Buttigieg
Arrow right icon
zł197.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8 (4 Ratings)
Paperback Dec 2014 250 pages 1st Edition
eBook
zł39.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial
eBook
zł39.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial

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

Arduino Android Blueprints

Chapter 1. Setting Up Your Workspace

The first chapter of this book will teach you the basics of the Arduino and Android development so that you can be sure you have the basics required for the more advanced tutorials you will find in the rest of this book.

On the Arduino side, we will build a very simple project with a relay module (which is basically a switch that can be controlled with Arduino) and a temperature and humidity sensor. We will also see the basics of the Arduino IDE and the basic commands of the aREST library, which is a framework to easily control Arduino boards. We will use this library in several chapters of this book to make it really easy to control the Arduino board from an Android device. In this first chapter, we will simply try out the commands of the aREST library by having the Arduino board connected to your computer via a USB.

From the Android development point of view, we will work together to set up a development environment and ensure that your computer and the Android device are ready for development purposes. We will start off with a simple Android app that displays the legendary text, Hello World.

Android Studio is an IntelliJ-based Integrated Development Environment (IDE) fully supported by the Android development team, which will provide you with the necessary tools and resources to make sure that you develop a functional and aesthetic Android app.

Android Studio is in beta but the software is updated on a frequent and regular basis by a dedicated team at Google, which makes it the natural choice to develop our Android projects.

Hardware and software requirements

The first thing you will need is an Arduino Uno board. We will use this board throughout this book to connect sensors, actuators, and wireless modules and make them interact with Android. Then, we will need a relay module. A relay is basically an electrical switch that we can command from Arduino, which can allow us to control devices such as lamps. This project uses a 5V relay module from Polulu, which properly integrates a relay on a board, along with all the required components to control the relay from Arduino. The following is the image of the relay module that was used in this chapter:

Hardware and software requirements

You will also need a DHT11 (or DHT22) sensor, along with a 4.7K resistor, for temperature and humidity measurements. A resistor is basically a device to limit the current flowing into an electrical device. Here, it is necessary to ensure the correct functioning of the DHT sensor.

Finally, you will need a small breadboard and jumper wires to make the different hardware connections.

The following is the list of all hardware parts you will need for this project, along with links to find these parts on the Web:

On the software side, you will need the Arduino IDE that we will also use in the rest of this book. You can get it at http://arduino.cc/en/Main/Software.

The installation process of the IDE is very simple; you simply have to open the file and follow the onscreen instructions.

You will need the library for the DHT11 sensor, which can be found at https://github.com/adafruit/DHT-sensor-library.

You will also need the aREST library found at https://github.com/marcoschwartz/aREST.

To install a given library, simply extract the folder in your Arduino/libraries folder (or create this folder if it doesn't exist yet). Your Arduino folder is where all the sketches are stored, and you can define this folder in the preferences of the Arduino IDE.

Preparing for Android development requires that we get ready to design and develop the app, and the following checklist will guide you with having the basics ready for any project:

  • Java Developer Kit Version 6 (or higher)
  • Android Studio
  • Android Software Development Kit
  • Android Device with Bluetooth SMART technology

We will also work together to make sure that you have everything properly set up.

Installing Java Developer Kit

Android Studio will not work without Java Developer Kit (JDK); therefore, it's necessary to know what Java version you have installed (in this particular case, the Java Runtime Environment will not be enough).

Checking the JDK version

It is mandatory that you check the version of your JDK for compatibility purposes.

Mac

Open Terminal and type the following command:

java –version

This is what will be shown on the screen:

Mac

Windows

Open Command Prompt and type the following command:

java -version

This is what will be shown on the screen:

Windows

Installing Java

If you do not have Java installed, or if your version is below 6.0, install the Java JDK by clicking on the following customized and shortened link and choosing the version that applies for you:

http://j.mp/javadevkit-download

The following window will open:

Installing Java

The main recommendation for these projects is that you install a version of JDK 6.0 or higher.

Select the JDK for your operating system. On an Intel-based Mac, you can follow this useful table to see whether your Mac is 32-bit or 64-bit:

Processor Name

32- or 64-bit processor

Intel Core Solo

32 bit

Intel Core Duo

32 bit

Intel Core 2 Duo

64 bit

Intel Quad-Core Xeon

64 bit

Dual-Core Intel Xeon

64 bit

Quad-Core Intel Xeon

64 bit

Core i3

64 bit

Core i5

64 bit

Core i7

64 bit

You can check for Processor Name by clicking on the Apple logo in the top-left corner of your screen followed by About my Mac.

In the case of Windows, to see whether your computer is running a 32-bit or 64-bit version of Windows, you need to do the following:

  1. Click on the Start button.
  2. Right-click on My Computer, and then click on Properties. If x64 edition is listed under system, your processor is capable of running 64-bit-enabled applications.

Installing Android Studio

Let's see how we install Android Studio on Mac and Windows:

  1. Go to the Android Developers site at http://developer.android.com. The following screen will appear:
    Installing Android Studio
  2. Click on Android Studio; you will be directed to the landing page where your operating system version will be detected automatically, as shown in the following screenshot:
    Installing Android Studio
  3. Accept the Terms and Conditions of the software use agreement:
    Installing Android Studio

Mac

Double-click on the downloaded file, follow the prompts, and then drag the Android Studio icon into your Applications folder:

Mac

Windows

Open the downloaded file, and then go through the following Android Studio Setup Wizard window to complete the installation process:

Windows

Setting up the Android Software Development Kit

The process of setting up the Android Software Development Kit (SDK) has improved vastly with the introduction of Android Studio, as the latest SDKs come preinstalled with the Android Studio install package. In order to develop the projects detailed in the following chapters, it would be very helpful to understand how you can install (or even uninstall) SDKs within Android Studio.

There are a number of ways to access the SDK Manager. The most straightforward way is through the following Android Studio main toolbar:

Setting up the Android Software Development Kit

Another option would be via the Launch menu where you will be faced with the following options:

Setting up the Android Software Development Kit

In order to access the SDK Manager, you will need to click on Configure, where the following screen will appear, and then click on SDK Manager:

Setting up the Android Software Development Kit

The previous screenshot shows us what the SDK Manager looks like. If you need to install any packages, you need to check the mark of that particular package, click on Install packages, and then finally accept the licenses, as shown in the following screenshot:

Setting up the Android Software Development Kit

Setting up your physical Android device for development

The following are the three main steps that need to be executed in order to enable your Android device for development:

  1. Enable Developer options on your specific Android device.
  2. Enable USB debugging.
  3. Entrust the computer with an installed IDE via secure USB debugging (devices with Android 4.4.2).

Enabling Developer options

Depending on your device, this option might vary slightly, but from Android 4.2 and higher, the Developer options screen is hidden by default.

To make it available, go to Settings | About phone and tap on Build number seven times. You will find Developer options enabled by returning to the previous screen.

Enabling USB debugging

USB debugging enables the IDE to communicate with the device via the USB port. This can be activated after enabling Developer options and is done by checking the USB debugging option by navigating to Settings | Developer options | Debugging | USB debugging.

Entrusting the computer with the installed IDE using secure USB debugging (devices with Android 4.4.2)

You have to accept the RSA key on your phone or tablet before anything can flow between the device via Android Debug Bridge (ADB). This is done by connecting the device to the computer via a USB, which triggers a notification entitled Enable USB Debugging.

Check Always allow from this Computer followed by clicking on OK.

Hardware configuration

For the first project of this book, there are only a few hardware connections to make. We simply need to connect the relay module and the DHT11 sensor to the Arduino board.

The following image summarizes the hardware connections for this chapter (with the DHT sensor on the left of the breadboard, and the relay module on the right):

Hardware configuration

The first thing you need to do is to connect the power from the Arduino board to the power rails on the side of the breadboard. Connect the Arduino 5V pin to the red power rail on the breadboard, and the Arduino GND pin to the blue power rail on the breadboard.

For the DHT11 sensor, you first need to have a look at the pins configuration of the sensor by visiting http://www.rlocman.ru/i/Image/2012/09/06/DHT11_Pins.jpg.

You need to first connect the power supply; the VCC pin goes to the red power rail on the breadboard, and the GND pin goes to the blue power rail. You also need to connect the DATA pin to pin number 7 of the Arduino board. Finally, place the 4.7K Ohm resistor between the VCC and the DATA pin of the sensor.

For the relay module, you have three pins to connect: VCC, GND, and SIG. Connect the VCC pin to the red power rail on the breadboard, GND to the blue power rail, and finally, connect the SIG pin to Arduino pin 8.

The following is an image of the completely assembled project:

Hardware configuration

Learning to use the aREST library

Now that our hardware is assembled, we are going to see the basics of the Arduino environment, and how to use the aREST library that we are going to use in several chapters of this book to control Arduino from an Android phone.

The aREST library will allow us to simply control the Arduino board externally using the same commands, whether it is using an USB cable, Bluetooth, or Wi-Fi. Without this library, we will have to rewrite the same code several times for all the chapters of the book. To find a complete documentation on the aREST library, you can visit https://github.com/marcoschwartz/aREST.

The main window of the Arduino IDE is where you enter the code to program the Arduino board.

Arduino code files are usually called sketches. The following screenshot is of the Arduino IDE with the code of this chapter already loaded:

Learning to use the aREST library

You will basically use two buttons that you can find on the left-hand side of the toolbar. The first one, with the check sign, can be use to compile the code. The second one will be used to upload the code to the Arduino board. Note that if the code has not been compiled yet, the upload button will also compile the code before uploading.

The second important window of the Arduino IDE is called the serial monitor. This is where you can monitor what your Arduino project is doing, using the Serial.print() statements in the code to generate debug output. You can access it by clicking on the top-right icon of the Arduino IDE main window.

The following screenshot shows what the serial monitor looks like:

Learning to use the aREST library

We are now going to build our first Arduino sketch in this book. What we want to achieve is simply to control the relay and read data from the DHT11 sensor. To do so, you are going to use the aREST library by sending commands from your computer. In the next chapter of this book, we are going to use the same commands but via a Bluetooth or Wi-Fi connection. The goal of this section is really to make you familiar with the commands of the aREST library.

The following code is the complete Arduino sketch for this part:

// Libraries
#include <aREST.h>
#include "DHT.h"

// DHT sensor
#define DHTPIN 7
#define DHTTYPE DHT11

// Create aREST instance
aREST rest = aREST();

// DHT instance
DHT dht(DHTPIN, DHTTYPE);

// Variables to be exposed to the API
int temperature;
int humidity;

void setup(void) {
  // Start Serial (with 115200 as the baud rate)
  Serial.begin(115200);
  
  // Expose variables to REST API
  rest.variable("temperature",&temperature);
  rest.variable("humidity",&humidity);
  
  // Give name and ID to device
  rest.set_id("001");
  rest.set_name("arduino_project");
  
  // Start temperature sensor
  dht.begin();
  
}

void loop() {  
  
  // Measure from DHT
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  
  temperature = (int)t;
  humidity = (int)h;
  
  // Handle REST calls
  rest.handle(Serial);
  
}

Let's explore the details of this Arduino sketch using the following steps:

  1. The Arduino sketch starts by importing the required libraries for the project:
    #include <aREST.h>
    #include "DHT.h"
  2. After that, we need to define on which pin the DHT11 sensor is connected to, and which is the type of the sensor:
    #define DHTPIN 7
    #define DHTTYPE DHT11
  3. We also need to create an instance of the aREST library:
    aREST rest = aREST();
  4. We also need to create an instance of the DHT11 sensor so that we can measure data from it:
    DHT dht(DHTPIN, DHTTYPE);
  5. Finally, we need to create two variables that will contain our measurements:
    int temperature;
    int humidity;
  6. In the setup() function of the sketch, we need to start the serial port:
    Serial.begin(115200);
  7. Next, we need to expose our two measurement variables so that we can access them via the serial port using the aREST library. Note that we have to pass the reference to these variables, not their values, as shown in the following code:
    rest.variable("temperature",&temperature);
    rest.variable("humidity",&humidity);
  8. We also set an ID and name to our project. This will not play any role here, but is simply to identify our board in case we have many of them:
    rest.set_id("001");
    rest.set_name("arduino_project");
  9. Finally, we start the DHT11 sensor:
    dht.begin();
  10. Now, in the loop() function of the sketch, we make the measurements from the DHT11 sensor, and convert these measurements to integers (which is called "casting" in C):
    float h = dht.readHumidity();
    float t = dht.readTemperature();
    
    temperature = (int)t;
    humidity = (int)h;
  11. Note that here we are converting these numbers into integers because it is the only variable type supported by the aREST library. However, as the resolution of the DHT11 sensor is limited, we are not losing any information here. Finally, we handle any requests coming from the outside using the following code:
    rest.handle(Serial);

    Note

    Note that all the code for this chapter can be found in the GitHub repository of the book at the following link:

    https://github.com/marcoschwartz/arduino-android-blueprints

It's now time to upload the sketch to your Arduino board. If you have any error when compiling, make sure that you installed all the required Arduino libraries for this chapter.

When this is done, simply open the serial monitor (making sure the serial speed is set to 115200). Note that you could do the same with your own serial terminal software, for example, CoolTerm found at http://freeware.the-meiers.org/.

Now, we are going to test that the aREST library is working correctly. Let's proceed with the following steps:

  1. First, we are going to query the board for its ID and name. To do so, type the following:
    /id
    
  2. You should be greeted by the following answer:
    {"id": "001", "name": "arduino_project", "connected": true}
    
  3. We are now going to see how to control the relay, as this is something we are going to do several times in this book. First, we need to define that the relay pin, which is pin number 8 of the Arduino board, is an output. To do so, we can simply type:
    /mode/8/o
    
  4. You should receive the following answer on the serial monitor:
    {"message": "Pin D8 set to output", "id": "001", "name": "arduino_project", "connected": true}
    
  5. Now, to activate the relay, we need to set the pin 8 to a HIGH state. This is done the following command:
    /digital/8/1
    
  6. You should instantly receive a confirmation message, and hear the relay click. To switch the relay off again, simply type the following code:
    /digital/8/0
    
  7. Now, we are going to read data from the board using the aREST library. For example, to read the temperature variable, you can simply type the following code:
    /temperature
    
  8. You will receive the following confirmation message with the value of the temperature:
    {"temperature": 28, "id": "001", "name": "arduino_project", "connected": true}
    
  9. You can do the same for humidity:
    /humidity
    
  10. You will receive a similar message back:
    {"humidity": 35, "id": "001", "name": "arduino_project", "connected": true}
    

If this is working, congratulations! You now know the basics of the aREST library that we will use throughout the book. Note that for now we are using these commands via serial communications, but later in the book, we will first use the same commands via Bluetooth, and then via Wi-Fi to command the Arduino board from an Android device.

Now that we have seen how the aREST library is working, we are going to create our first Android project. Note that in this introductory chapter, we won't connect both together; this will be done in the next chapter of the book.

Creating your first Android project

In order to get started in the world of Android application projects, it would be very useful to set up a very basic project that goes through the two main processes in Android application development: coding the application and then testing it on an Android physical device.

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Setting up your first Hello Arduino project

Click on New Project when Android Studio launches as shown in the following screenshot:

Setting up your first Hello Arduino project

An important step within Android application development is configuring your project. This project will be using Android 4.3 as the minimum target SDK, since we intend to use the Bluetooth Low Energy API, which was introduced in this particular version of Android. In this case, we will name the project Hello Arduino and write down your company domain, as the convention for application package names is the reverse of your chosen domain.

Refer to the following screenshot:

Setting up your first Hello Arduino project

For the purposes of this particular project, we will go ahead and choose the most basic project, Blank Activity, as shown in the following screenshot. The other choices provide added functionality that we do not need at this stage.

Setting up your first Hello Arduino project

In the following screenshot, we choose Blank Activity, and we need to give a name to our main Java file. Let's keep it as MyActivity:

Setting up your first Hello Arduino project

Once you follow through all the previous steps, you will be welcomed to this workspace, which gives a good overview of the project tree, main code editor, and the device that shows a preview of the User Interface (UI), as shown in the following screenshot:

Setting up your first Hello Arduino project

In this particular project, there will be no need to modify the existing code and therefore we will proceed with building our app and launching it on our physical Android device.

Installing your app on your physical device

Previously, we have connected and enabled our physical Android device via a USB. Within Android Studio, we need to set up the configuration to run our Android application.

This is done by choosing Editing Configurations from the main toolbar as shown in the following screenshot:

Installing your app on your physical device

In the Editing Configurations window, we will click on the + sign and choose Android Application where we set up the configuration with the following settings and confirm them by pressing OK:

Installing your app on your physical device

After setting up everything, we are ready to run the app. Choose the App configuration, which we previously set up, and press the Play button (green triangle) as shown in the following screenshot:

Installing your app on your physical device

There is the possibility of creating an Android Virtual Device (AVD) to install the application. However, at this point in time, there are no virtual emulators that support Bluetooth, which we will need for a number of projects in this book. So, we will focus on setting up your Android physical device running Android 4.3 or higher.

In the next step, choose your physical device and press OK, as shown in the following screenshot:

Installing your app on your physical device

You should expect the following to show up on your Android device if you have set up everything in the correct manner:

Installing your app on your physical device

Summary

Let's summarize what we did in this chapter of the book. We built a very simple Arduino project comprising an Arduino board, a relay module, and a temperature and humidity sensor. We saw how to connect these components together so that we can control the relay as an output and read data from the sensor. We also saw the basics of the aREST library, which we will use in the whole book to control the Arduino board from an Android device.

On the Android side, we have prepared our IDE and Android device for development, which will prepare us for the upcoming projects that we have prepared for you in this book and help us have a seamless experience. We also had the opportunity to compile our first app and get it up and running on our Android device.

At this stage, you can already repeat the steps we took in this chapter to really get familiar with the Arduino IDE, the commands of the aREST library, and the Android development environment. We will use these tools extensively in the rest of this book; so, it is crucial that are you familiar with them.

Left arrow icon Right arrow icon

Description

This book is for those who want to learn how to build exciting Arduino projects by interfacing it with Android. You will need to have some basic experience in electronics and programming. However, you don't need to have any previous experience with the Arduino or Android platforms.
Estimated delivery fee Deliver to Poland

Premium delivery 7 - 10 business days

zł110.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 22, 2014
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781784390389
Vendor :
Google
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
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Poland

Premium delivery 7 - 10 business days

zł110.95
(Includes tracking information)

Product Details

Publication date : Dec 22, 2014
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781784390389
Vendor :
Google
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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 zł20 each
Feature tick icon Exclusive print discounts
$279.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 zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 500.97
Arduino Robotic Projects
zł197.99
Arduino Android Blueprints
zł197.99
Arduino Home Automation Projects
zł104.99
Total 500.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. Setting Up Your Workspace Chevron down icon Chevron up icon
2. Controlling an Arduino Board via Bluetooth Chevron down icon Chevron up icon
3. Bluetooth Weather Station Chevron down icon Chevron up icon
4. Wi-Fi Smart Power Plug Chevron down icon Chevron up icon
5. Wi-Fi Remote Security Camera Chevron down icon Chevron up icon
6. Android Phone Sensor Chevron down icon Chevron up icon
7. Voice-activated Arduino Chevron down icon Chevron up icon
8. Control an Arduino Board via NFC Chevron down icon Chevron up icon
9. Bluetooth Low Energy Mobile Robot Chevron down icon Chevron up icon
10. Pulse Rate Sensor Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(4 Ratings)
5 star 75%
4 star 25%
3 star 0%
2 star 0%
1 star 0%
Zachary L. Stauber Sep 29, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am giving this 5 stars because I don't think there are any other books like it, but it does come with some warnings. I bought it specifically for the Android controlled Bluetooth robot plans near the end of the book. The author gives links directly to parts on the DFRobot and Adafruit websites supplying the parts he uses, which is great, and he explains everything very well.The links still work. However, particularly in the case of DFRobot, some of their parts had actually changed since the book's printing, so you'll need to order extra parts to fill in the now-missing pieces (in my case, some longer metal standoffs, a charger for the battery, and some extra jumper wires).In addition, you will need to learn to solder to affix header pins to the Bluetooth module, so you'll need a soldering kit, which immediately bumps up anything Arduino to at least intermediate skill level, as the Arduino starter kit doesn't touch on soldering.The worst part, though, was that the Android libraries have all changed since late 2014, and the Android code in the book, which I'm sure worked when the book was written (it compiles fine), now throws exceptions all over the place and does not connect a phone to the robot. Luckily I downloaded some source code for the Nordic Semiconductor's nRF UART app which was recommended by Adafruit to test the Bluetooth module used on the robot, which did work with the newer Android SDK's, and I was able to adapt that to get the robot connecting and working.However, all of this took at least 3 extra orders of parts (including the soldering kit) and reviewing numerous tutorials online on soldering and Android programming, which I was not prepared for. The extra orders did not cost a lot of extra money, but DFRobot is in Hong Kong, so sometimes it took weeks.All of that being said, none of this is the book's fault. These were changes made by DFRobot to products without changing their part numbers, and by Google to the Android SDK's which invalidated working source code. This book got me pretty far, and I was able to get the rest of the way using free online tutorials. I don't think there are any other books out there, yet, that would even do that much.
Amazon Verified review Amazon
SA Mar 11, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very well documented projects. As the title says, you should have a working knowledge of Android development for these projects but no need to be an expert Android developer.You may want to buy the book first and browse some of the hardware lists near the beginning of most chapters. The hardware lists are complete and also include the URL of the various parts suppliers.Found the projects easy to follow and so far, all work well for me through the first 3.
Amazon Verified review Amazon
Chaminda Divitotawela Feb 25, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I love this book as it start from very beginning. It is learn by practising and I love that model because it is so effective. Any one who love hobby electronics and integrate it with Andriod and Ardunio, then this is the book. You don't need great deal of knowledge in either very much. I feel anyone with some background in programming would be able to use this for best.
Amazon Verified review Amazon
David Jan 29, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Great book, the projects where easy to follow and explained pretty well. I would recommend you look at each project and figure out what you need to build it. Then order the components right away. I found my self waiting... and it was hard not to keep reading. The authors leaves github links so you can download the code if you get lost. Over a great book for learning more about he Arduino platform.
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