O'Reilly logo

Arduino Home Automation Projects by Marco Schwartz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a graphical interface

However, it's not convenient to control the hacked device from the serial monitor. We are now going to build a simple interface to control this device. The interface will be really basic and include two buttons: one to set the relay on and the other to set the relay off.

The interface is based on HTML for the interface itself, JavaScript to handle the commands, and PHP to interface with the Arduino board. This interface is very similar to the one we developed in Chapter 2, Control Lights from Your Phone or Tablet.

The following code will be a walkthrough of the different pieces of the interface. All the files have to be located inside the same folder at the root of your web server folder. You can find the complete ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required