Hardware Reference
In-Depth Information
Summary
In this chapter, we interfaced a relay to the Arduino board and the Ethernet shield so that it
can be controlled remotely. To do so, we used two different approaches, each with their
own advantages and disadvantages. First, we kept things local and controlled the relay
from within your local network. This solution has the advantage that even if your Internet
connection is down, the project still works.
Then, we used a dedicated web service to control the relay from anywhere. This is clearly
an advantage of the latter approach; however, it will not work if your Ethernet shield is not
connected to the web.
The following were the major takeaways from this chapter:
• First, we chose the different components for the project, and assembled them so
that we can control a device from the Arduino board such as a desk lamp.
• Then, we wrote the first sketch to test the project by simply switching the relay on
and off.
• After that, we built the first application based on the hardware we just assembled.
We used a dedicated library so that the Arduino board could receive commands
from the network using the Ethernet shield. We also built a simple web-based in-
terface so that you can control the relay from a graphical interface running on your
computer.
• Finally, we used a web service called Teleduino to control the relay from anywhere
in the world. We also modified the graphical interface so that we can control the
relay from anywhere.
In the next chapter, we are going to take yet another approach and use the Ethernet shield to
connect our Arduino projects to the Internet of Things . We are going to perform some
measurements on the Arduino board and send this data right to a cloud service. Using this
service, we will be able to monitor the measurements that come from the board in real time
and from anywhere in the world.
Search WWH ::




Custom Search