Hardware Reference
In-Depth Information
is rare for residential Internet connections, but still possible; check with your
Internet service provider (ISP). If that is the case, just type what is my ip into
Google, and it will tell you what your global IP is. If you know you have a static
IP, you can access that IP from anywhere in the world and traffic on it should
forward to your Arduino. If you want, you can even buy a domain name and
set up your domain name's DNS servers to point to that IP address.
However, the odds are good that you have a dynamic global IP address. Your
ISP probably changes your IP once every few days or weeks. So, even if you
figure out what your global IP is today, and access your Arduino via this IP, it
might stop working tomorrow. There is a clever way around this, which is to
use dynamic IP services. These services run a small program on your router
that periodically checks your global IP address and reports it back to a remote
web server. This remote web server then updates a subdomain that you own
(such as myarduino.dyndns.org ) to always point to your global IP, even when it
changes. DynDNS is a service that has software built in to most modern routers.
Search your router administration page to see which dynamic DNS services it
supports. Some are free; some charge a nominal yearly fee. You can follow the
setup instructions in your router's admin panel to create an account with one of
these services and to connect it to your router. After doing this, you can access
your Arduino remotely, even with a dynamically changing global IP address.
In case your router does not support any dynamic DNS services, remember that
some also offer clients that will run on computers within your network rather
than on the router directly.
Once you have determined your public IP address (or obtained a dynamically
updating URL), you can enter that into your browser, and you should connect
to your Arduino. Give the address to a friend so they can test remotely!
SendingLiveDatatoaGraphingService
In the preceding section, you learned how to turn your Arduino into a web
server that exposed a web interface for controlling its I/O pins over the local
network or the Internet. However, an equally common reason for connecting
your Arduino to the Internet is to make networked sensor nodes. Sensor nodes
generally only transmit information, instead of listening for commands. Because,
in this scenario, the Arduino will be initializing a request out to a known entity
on the web (in this case you will use an online graphing service), you do not
have to fuss at all with forwarding IP addresses, memorizing the IP address,
and so forth.
This section uses an online graphing interface called Xively (previously called
Cosm ) to facilitate the creation of live graphs with your Arduino.
 
Search WWH ::




Custom Search