Hardware Reference
In-Depth Information
Testing the graphical interface
It's now time to test the interface. Make sure that the web server is running on your com-
puter. Also, make sure that all the files of the interface are placed inside a folder at the root
of your web server. You can go over to this folder in your browser (by typing in local-
host ) and open the HTML file. This is what you should see:
To test the interface, simply try to click on these different buttons. You will see that the
lights switch instantly whenever you press the right button. If it doesn't work at this point,
there are several things you can check.
The first thing is to check that your web server is running correctly. Also, check that you
have entered the right name for your Arduino board (or the right IP address) inside the PHP
file. Finally, make sure that your Arduino sketch is working correctly by typing the com-
mands inside your web browser directly. Also, note that at this point, you should also have
set the relay pins to be outputs, as we saw in the section where we tested our Arduino
sketch.
Of course, all the code for the interface is available on the GitHub repository of the project
at the following web page:
https://github.com/openhomeautomation/arduino-home-automation/tree/master/chapter2
You can now also go over to your mobile device, smartphone, or tablet, and use this inter-
face. To do so, simply find out the name of your computer on the network. This really var-
ies depending on your operating system, but it is usually in a menu similar to the one called
Search WWH ::




Custom Search