Step 5: Accessing and controlling the Arduino from the Web

If the Arduino is connected to the LAN and thereby to the Internet, and if the Yaler instance at the specified IP address is up and running, you should now be able to access the Arduino Web LED at http://{Yaler IP}/{Relay Domain}/led, e.g.

You'll get an HTTP 504 Gateway Timeout if the Arduino is not running . Depending on your browser this is shown as a blank page or as "Gateway Timeout". In this case, make sure everything is tightly plugged in and try resetting the Arduino.

If everything works as intended, you should see a simple HTML page with three colored buttons . If you press a button, the Arduino LED should light up in the corresponding color.

Behind the scenes this works with a simple Javascript that sends an HTTP PUT request , e.g. PUT to the Arduino to set the LED's color. You can use Firefox with the Firebug add-on set to Net > XHR to see the PUT requests.

Note that the URL does not depend on the current location of the Arduino. No matter if it's attached to your home network or to the LAN at your office, the URL remains the same. Just plug in the Arduino and control it with your browser.

Because typing the URL can be cumbersome, you can make use of a QR-Code generator like to get a QR-Code of your Arduino's URL (example below).

Print it, stick it to your Arduino, access it with a QR-Code reader like Lynkee (iPhone), Kaywa (Symbian, Java phones) or Quickmark (Windows Mobile) and there you have a switch-less, yet conveniently controllable Arduino.

That's it! Thanks for your time.

If you got any questions or trouble debugging your setup, please let me know in the comments.

Remove these adsRemove these ads by Signing Up
btan31 year ago

I made changes to the code and everything. Now I'm trying to access the website but I can't. I tried{Relay Domain}/led and{Relay Domain}/led. Both of the lead to server error page. Am I missing something here?
tamberg (author)  btan31 year ago

the server error page is likely HTTP Status 504 (Gateway Timeout). This is Yaler's response if no device is available at the given Relay Domain.

Reasons might vary from typos to memory overflow. Can you add some Serial output to your Arduino program to see if the program is running and if it get's the request from your browser?

Kind regards,
btan3 tamberg1 year ago

Thanks for the reply. I uncommented all serial print commands in the code. It prints setup on the serial monitor which means it goes through void setup but nothing after that and I can't access the website. Am I using the correct web address here? I'm using arduino nano with ethernet shield btw if that makes any difference.

Thank you.
tamberg (author)  btan31 year ago
If the shield works fine with other examples, maybe the Nano runs out of memory?
btan31 year ago

When you say "you should now be able to access the Arduino Web LED at http://{Yaler IP}/{Relay Domain}/led", what is the Yaler IP?
tamberg (author)  btan31 year ago
Hi, if you use the hosted ervice the IP in the source code is fine.

Kind regards,
tamberg (author) 3 years ago
Hi, looks like is down. Will investigate. Sorry for the inconvenience. Cheers, tamberg
tamberg (author)  tamberg3 years ago
Ok, should be up again.

tedlawson3 years ago
I miss your demo. Tried to get this going: substituted my MAC from the Ethernet shield and current IP of '" ( and changed the generic ID. Uploaded OK but cannot connect?
In step 5 you state: "if the Yaler instance at the specified IP address is up and running". Don't really know what this means or how correct it?
Any insight?