Pages: [1]   Go Down
Author Topic: Arduino and the internet?  (Read 696 times)
0 Members and 1 Guest are viewing this topic.
USA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi im a High school senior and i've been working on a home automation project for an internship. So far i have been able to get the arduino to serve a webpage and control relays based on input from the page (i also hooked up a lm34 temp sensor). Im ready to start testing it over the internet rather than my home network but i have been unable to find any guides / code examples that make the arduino accessable over the internet rather than just the local network. I've used the Webduino library for the server. Has anyone seen a decent guide/ code example for getting the arduino on the internet? thanks.
Logged

California
Offline Offline
Faraday Member
**
Karma: 82
Posts: 3123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Controlling the Arduino over the internet versus just the local network has nothing to do with the Arduino's code and everything to do with your network setup. Assuming you are using a small home router that provides NAT (Your local IP address is different from your external address), then you would need to configure your router to forward port 80 (or whichever port you are using) to your Arduino. Some ISPs block port 80, so that's something to keep in mind.

How to forward ports on your router depends on the router you are using. Typically, you need to log into the web interface of your router and look for the port forwarding option.
Logged

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8911
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You also need to look at using one of the dynamic IP services like dyndns or no-ip.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

New River, Arizona
Offline Offline
God Member
*****
Karma: 16
Posts: 906
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I personally use dyndns to do this.  The idea is that you need an address that is propagated through the domain name servers out in the world and there are services to do this kind of thing.  Go to dyndns web site and take a look around.  Here is a reasonably easy to read article that can help:

http://www.makeuseof.com/tag/connect-home-network-dyndns/

There's a couple of gotcha's though.  Your internet provider may well change your ip address at home without notice.  Mine used to do it twice a day on average, usually around 8PM.  This means you have to 'publish' your ip again to be sure that the dyndns service has the correct values.  You do this by sampling your externally visible ip address a couple of times and hour or so, and if it has changed, do the publish thing to get the value corrected.

If you don't need a name on the DNS servers, you can actually just get your ip by going to  http://checkip.dyndns.com/ which will return your address and then you type it into the URL line of your browser; just like when you're configuring your DSL modem.

I hope some of this makes sense to you
Logged

Trying to keep my house under control http://www.desert-home.com/

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick responses, I guess I was looking at it the wrong way I dont think I'll have too much trouble getting it online now. Thanks again.
Logged

Pages: [1]   Go Up
Jump to: