Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

How do I figure out how to connect to my arduino using ethernet shield?

It prints the IP in the serial monitor, but it doesn't work, and adding the port doesn't make a difference.

The client example works, so it's not broken or anything.

I'm using Arduino 1.6.5 IDE on a Mega 2560. I'm trying to run the Examples/Ethernet/WebServer example.

share|improve this question
    
Please state which Arduino you have. Also which version of the IDE. You need to run one of the "server" examples, please state which example you are trying. –  Nick Gammon Aug 24 at 20:44
    
@NickGammon Like this? –  Darklightus Aug 24 at 22:34
    
What IP address are you using? What are you typing into your web browser? What do you see in the Serial Monitor? –  Nick Gammon Aug 24 at 23:37
    
@NickGammon That's in the original post: "It prints the IP in the serial monitor, but it doesn't work, and adding the port doesn't make a difference." Meaning I take the printed ip. using ip:port doesn't work either. –  Darklightus Aug 25 at 1:26
    
It prints the IP in the serial monitor - I'm not asking you to describe what you see. Please copy and paste it. What IP addresses are you using on your local LAN? For example, do you see a message like "new client"? –  Nick Gammon Aug 25 at 2:22

1 Answer 1

Your question is kind of trivial, but from what I understood you're typing the IP address (that the Arduino displays on the serial monitor) into your browser.

First, make sure you connect your Ethernet shield to your router using an ethernet cable. (Now it's connected locally...)

Second, even if you type in your Arduino's IP address into the browser, the browser will return nothing because the Arduino simply has nothing to display, and hasn't been programmed to accept requests.

To actually have the Arduino display something you can try the Webserver example sketch or you can follow this great Tutorial that I found very useful for beginners.

BTW ports are only used to expose your Arduino to the Internet, in other words if you don't portforward to your Arduino, your Arduino won't be able to get requests from outside your local network (Wi-Fi,Ethernet).

share|improve this answer
    
Like I stated in the question, I'm using the webserver example sketch. I also portforwarded my arduino. –  Darklightus Aug 25 at 22:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.