Reader small image

You're reading from  Internet of Things with Arduino Cookbook

Product typeBook
Published inSep 2016
PublisherPackt
ISBN-139781785286582
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
Marco Schwartz
Marco Schwartz
author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz

Right arrow

Basic robot control


In this recipe, we are finally going to dive into the core of this chapter: making our robot move around! We'll learn how to configure it so it can receive commands via Wi-Fi, and then we'll learn how to control it using a simple interface running inside your browser.

Getting ready

For this recipe, just make sure that you followed all the recipes so far in the chapter. Also, it is recommended to leave the robot in a position where the wheels or track are not touching the ground, at least till you are sure it is working correctly.

How to do it...

We are now going to program the robot so it accepts commands via Wi-Fi. For that, we'll use the aREST framework that we have already used several times in this book.

The sketch starts by including the required libraries:

#include <SPI.h>
#include <WiFi101.h>
#include <aREST.h>

Then, you need to define your Wi-Fi network name and password:

char ssid[] = "wifi-name';
char password[] = "wifi-pass';

After that, we declare...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Internet of Things with Arduino Cookbook
Published in: Sep 2016Publisher: PacktISBN-13: 9781785286582

Author (1)

author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz