Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Arduino Home Automation Projects
  • Table Of Contents Toc
  • Feedback & Rating feedback
Arduino Home Automation Projects

Arduino Home Automation Projects

By : Marco Schwartz
4 (10)
close
close
Arduino Home Automation Projects

Arduino Home Automation Projects

4 (10)
By: Marco Schwartz

Overview of this book

This book is divided into projects that are explained in a step-by-step format, with practical instructions that are easy to follow. If you want to build your own home automation systems wirelessly using the Arduino platform, this is the book for you. You will need to have some basic experience in Arduino and general programming languages, such as C and C++ to understand the projects in this book.
Table of Contents (9 chapters)
close
close
8
Index

Controlling the device from your computer


We are now going to build the Arduino sketch we will use to control the relay remotely. This will be based again on the aREST library that will help us handle the request sent from your computer.

This Arduino sketch starts by including the required libraries as follows:

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

Then, we can create the aREST instance:

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

Then, in the setup() function of the sketch, we simply start the serial connection so that we can access the board later:

void setup(void)
{
  // Start Serial
  Serial.begin(9600);

}

Next, we can handle the requests coming on the serial port by using the following code:

void loop() {

  // Handle REST calls
  rest.handle(Serial);

}

Note

Now, we can actually test the device you just hacked. Note that the code for this part is available on the GitHub repository of the project at the following location:

https://github.com/openhomeautomation/arduino-home-automation...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Arduino Home Automation Projects
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon