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

Testing the project


We can now write a simple test for the project, just to see if the hardware connections are correct. We are going to write the code inside the Arduino IDE. Note that this section explains the code for testing the project, and that can you find the complete code in the GitHub repository of the project.

The code starts by defining the pin of the current sensor:

#define CURRENT_SENSOR A0

We then define the different variables that are necessary for the test. Here, we are going to measure the current and the power. Note that we don't measure the voltage of the device, so you will have to define it yourself depending on your country:

float amplitude_current;
float effective_value;
float effective_voltage = 230; // Set voltage to 230V (Europe) or 110V (US)
float effective_power;
float zero_sensor;

Then, in the setup() function of the sketch, we need to get the zero value of the sensor. As we have an analog sensor, we need to know what the sensor is reading when no current is flowing...

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