Arduino Control via a Web Service with Teleduino

Picture of Arduino Control via a Web Service with Teleduino
Convert your Arduino into a sofisticated web control platform using Teleduino.

Teleduino is both a product and a service. Once the Teleduino sketch has been loaded on your Arduino (the 'product'), it then connects to the Teleduino server awaiting your instruction from anywhere in the world via the internet (the 'service').

Typically there are no firewall changes required, and if your network supports DHCP then no network configuration is needed on the device. Easy!

The Teleduino platform allows you to perform the following with your Arduino, all via the internet:
  • Reset, ping, get version, get uptime, get free memory.
  • Define pin modes, set digital outputs, set analog outputs, read digital inputs, read analog inputs, or read all inputs with a single API call.
  • Define up to 2 'banks' (4 for the Mega) of shift registers. Each 'bank' can contain up to 32 cascaded shift registers, giving a total of 512 digital outputs (1024 for the Mega).
  • Shift register outputs can be set, or merged, and expire times can be set on merges (you could set an output(s) high for X number of milliseconds).
  • Define, and read and write from serial port (4 for the Mega).
  • Read and write from EEPROM.
  • Define and position up to 6 servos (48 for the Mega).
  • Set preset values for the above functions, which get set during boot. Preset values are stored in the first 178 bytes of the EEPROM (413 for the Mega).

Just imagine what you can do. The possibilities are endless. What makes it even better? The process is quick and easy.

This tutorial will guide you through creating a Status LED for your device, then obtaining and uploading the Teleduino library/sketch to your ethernet enabled Arduino Uno (or equivalent).

To complete this tutorial you need:
  • Arduino Uno / Mega (or equivalent)
  • Ethernet Sheild (Wiznet based)
  • LED
  • 1K Resistor (or similar)

This is our first tutorial and will be adding neat project tutorials for achieving specific tasks.

If you get stuck on any of the steps, or if you feel that there is a step that could be explained better, please leave a comment so that we can improve things.

Remove these adsRemove these ads by Signing Up
1-40 of 70Next »
I just wanted to say that you can download an early version of Teleduino Controller for Android devices on Google Play :

And like the info says, if you miss any functions please contact me and I will try to add it in future releases.
eustacius18 days ago

hi, can anyone tell me how to use set serial, get serial, define serial and flush serial?? what im trying to do is that i want my teleduino to read the serial (im using mega 2560). i tried to define it first, then get serial but i get only empty. i dont know if i did it wrong or what. can help? or send me tutorial link for that. thanks

ThomasF52 months ago

I was able to get the first URL to work, but the second and all related to LED control on next steps give me the following error message.

{"status":400,"message":"Invalid request syntax. Visit http:\/\/ for protocol reference.","response":[]}

I input the string you reference with my key inserted as show below (and shown in quotes so you can see the syntax)


Any ideal what I can do to correct this?

SS_20134 months ago


Need help. The link LED on the W5200 ethernet shield is always red. The Led on pin 8 blinks: 1, 1-2. That is all that is happening. Please assist in resolving. Thank you.

CarlosC54 months ago


when I run the compilation of the sketch this message:

Tamaño binario del Sketch: 28.978 bytes (de un máximo de 28.672 bytes) Sketch demasiado grande; ver para consejos de como reducirlo.






arduino software version 1.0.6

what i am doing wrong?


buzz.pai5 months ago

Excuse me why my UNO LED just blink 6 times....

and manage presets say Key is offline or invalid.

I had changed 3 keys...

Hello! I have this problem: Everything works well until the power is in charge of Arduino. But if you turn the power off and back on, the connection to the server Teledyne not happening! The led is burning. If you press the reset button on the Board, then everything begins to work as it should! What you need to do to when power is turned off,then I could then press the button on the Board. Thank you!

bclagett1 year ago

Can new values for variables (as set temps in a thermostat) be sent to the Arduino?

Dr_L1 year ago

The ethernet shield is based on the W5100 ic. By any chance, was anyone able to make teleduino work using the much cheaper ENC28J60 ethernet controller chip?

ikumar51 year ago

got {"status":403,"message":"Key is offline or invalid.","response":[]} this me out kindly...

nathanknz (author)  ikumar51 year ago

Hi ikumar5,

This message means one of two things. First off, please check to ensure that the key you're using is correct. Secondly, please check that your device is connecting successfully. Have you attached an LED to pin 8 to read the status output? This will provide clues as to whether or not the device is connecting to the server ok.

Hope that helps!

thanx nathen it worksn one more thing am using teleduino cotroller app i want to read a sensor data but i am getting struck with that stuf could u help me how to read a data through the app.. this is tha app
nathanknz (author)  ikumar51 year ago

Hi ikumar5,

Great to hear you got it up and running. In regards to your question about the Teleduino Pro app, it's written by a third party and is not directly related to the Teleduino project. Please contact the author of the app with any questions. Thanks!

Dunes21 year ago

Hi, I have a strange problem. Initially everything was looking good, but suddenly the board does not complete the login. It stops after three flashes of the status LED. Regardless of this I get response when i send an instruction.

I even get an OK response when i have unplugged the board!!!

The response looks like this:


I get this regardless of which instruction I send.

In this case I asked for "getAllInputs"...

Any ideas on how this can happen?

Regards from Leif in Sweden

nathanknz (author)  Dunes21 year ago

Hi Leif,

This is definitely strange. I suspect the response you're seeing is a result of a browser cache? It should definitely not return 'OK' if the device is not connected.

Failing after 3 flashes indicates that your device is failing to connect to the server. I would suggest trying a different MAC address (so that your router will see it as a new device), and possibly even trying changing the serverPort value in the sketch (the server listens on ports 53 and 5353).

If you continue to experience trouble, feel free to contact me directly for further diagnosis.

wasimxxl1 year ago
can any one help me please ??

i wont to use arduino in my project ..
i wont ardino send alarm to my androin phone 'by internet ' whin the Bell home is ring
What are the pieces that will I need ??
remember by internet no IRir no blotooth
thank you
lope121 year ago
Cant upload the sketch to the arduino rev 3
error say:
teleduino was not declared in this scope

what i am doing wrong?
lope12 lope121 year ago
fix it,it was not in right dir.
Load up ok now.
Next i change the mac address and copy the coded key in place of the zeros. did not change any of the ip numbers or subnet.
but now i cant connect to:{key}&r=getVersion
and yes i change the key.
I know it me lol i am realy new in arduino but love to have this working

Regards Lope 12
lope12 lope121 year ago
Hi All.
Forget all my questions ask.
it works like a champ now.
i did all ok but ms explorer dont display the text from server, just want me to download or open it.
Use chrome now and all works like it should.

Perfect Thanks
Regards Lope
nathanknz (author)  lope121 year ago
Hi Lope,

Thanks for the confirmation. Great to hear you got it working!

nathanknz (author)  lope121 year ago
Hi Lope12,

That error would occur for one of two reasons:
1) The library is not in the correct libraries folder, or
2) The Arduino software was not restarted after copying the library into the libraries folder

Let me know if you continue to have trouble after checking those two points.

bruiser691 year ago
Sorry I forgot the error message. "Website Declined to show this Webpage"
Most likely cause - Website requires you to log in

What should I see if I can get to site?

Do you know of a customisable webpage that will work with Teleduino to give realtime feedback on input/outputs & allow remote readings and configuration?
The reason I ask is I would like to remotely monitor voltages of a battery bank, get alerts when issues arise & even start/stop a generator if solar input is too low.

nathanknz (author)  bruiser691 year ago
Hi Bruce,

If you use a different browser (such as Google Chrome), or turn off the friendly HTTP error pages in Internet Explorer then you should be able to see the response in full.

I know of people that have successfully integrated with Cosm and ThingSpeak, as well as custom applications for doing monitoring and control. There is also an unofficial Android app available to operating your Teleduino.
bruiser691 year ago
Where can I download the sketch? I can't see a link in the Instructable.
nathanknz (author)  bruiser691 year ago
Hi Bruce.

Thanks for the comment. Once you've installed the library (Step 3) and restarted the application, the sketches are listed under the examples.

Open up the Arduino IDE. Click 'File' -> 'Examples' -> 'Teleduino328' -> 'TeleduinoEthernetClientProxy'. This will open up the sketch that we'll be using.

Hi Nathan,

Thanks for clarifying that. I can now see the TeleduinoEthernetClientProxy in Examples. I opened sketch and loaded my Teleduino code that I got from their site.
I did not change any other settings. I the plugged Arduino Uno Ethernet shield into my ADSL2+ router which is connected to Internet.

I copy & pasted the Teleduino URL shown in Instructable inserting my key (the original one, not the one generated to enter into sketch.
When I enter on this{F06EB5D9B8CFF1C5972CAA934E89D53E
}&r=getVersion I get error that can't show site.

Any idea why I can't connect to Teleduino? Could it be blocked by my Billion 7404VNPX router?
nathanknz (author)  bruiser691 year ago
Hi Bruce.

It sounds like you're seeing 'friendly HTTP status errors' in Internet Explorer.

The underlying problem, however, is that your device is not connected to the Teleduino cloud service. Have you connected a status LED to pin 8? This will flash codes during startup which helps with troubleshooting.
dslrmotion1 year ago
Everything works as explained in the tutorials. Thanks for all the hard work developing this service. Would love more tutorials in the future if you ever find time. I do have one question. Not sure if I should ask here but I will anyway. I have two Teleduino's hooked up at the same time from two different ports from my router and they seem to conflict with each other. What steps would I take to eliminate this problem? Thanks again for unlimited future projects. Joe
nathanknz (author)  dslrmotion1 year ago
Hi dslrmotion,

Thanks for the kind words!

There is no limit to how many devices you can run on the same network (and you can run them all with the same serverPort). You just need to ensure that the mac[] variable is different for each device, and if you're not using DHCP (it is enabled by default), then you'll need to set unique network settings for the device.

siddiqov1 year ago
Hi again,
I have tried many times and wonder about TeleduinoEthernetClientProxy sketch.
if i upload it as it is except replace the key, it works. But as i make some change even a single statement of declaring a variable e.g. int pin=4; it generate error of the following
{"status":403,"message":"Key is offline or invalid.","response":[]}. if i remove the customize code it starts working again. Why is it exhibiting such behavior?
nathanknz (author)  siddiqov1 year ago
Hi siddiqov,

Adding custom code shouldn't cause any problems unless it exceeds the devices flash memory or volatile memory (SRAM).

The 403 is a response given by the server if either the key is incorrect or device has not connected to the server.

If you're having trouble getting your device to connect to the server, I would recommend connecting a status LED to pin 8 and checking at which stage the connection is failing - this would help to find a solution.

siddiqov1 year ago
Hi NatahnKnz,
there is an example of fading. i want to run it through teleduino. but don't know how to do it. the example is using pin 9 for the LED, i can turn it on and off through teleduino but how to pass loop controlling variables. will be very grateful to you in this regards.
the code is here
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect

// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
nathanknz (author)  siddiqov1 year ago
Hi siddiqov,

Unfortunately fading is not natively supported in the standard Teleduino library.

You could, however, add the extra code to the library. The analogWrite function is being called at line 332 of the Teleduino328 library (version 328-0.6.7).

Thank you. how about if i send request to turn on PIN 4 and then in the loop i start checking in if(pin==0n){ then do my fading coding}else{do nothing}
if (pin4==ON){
set pin5 high
set pin6 high
something like that.
is it possible to handle multiple pins while in one go.
Best regards
nathanknz (author)  siddiqov1 year ago
Hi siddiqov,

An override like you've suggested should work fine.
If you just want to replicate the output of one pin to another, the following would probably work (untested):
digitalWrite(5, digitalRead(4));
Just make sure you have the pin modes set to OUTPUT.

Hi Nathanknz,
I used fade example for my two linear actuator to extract and retract simultaneously just like to open a box top at both ends and found that from pin 1-8 doesn't activating the linear actuators although i have checked with leds and serial monitors and both are showing that PINS are responding. but as i attached these linear actuators with pin 9 and on-wards, these are activating the actuators. just posting my stupid experiences to help someone who face same things in future.
siddiqov1 year ago
Hi NathanKnz,
I want to set more then one pin on for a specific time, but don't know how to do it in one go. there is a URL but only for only one pin like pin 4.
nathanknz (author)  siddiqov1 year ago
Hi siddiqov,

Thanks again for your comments.

Your question was actually very well timed! In the current version of the firmware (328-0.6.7) you are not able to set multiple outputs with a single API call, but I'm currently testing the next version (328-0.6.8) which supports exactly that! It should be released within the next couple of weeks once I'm satisfied that it's tested out fine.

Setting multiple outputs on a shift register is already supported via a single API call, but requires further components.

siddiqov1 year ago
Thank you Nathanknz, the problem in my case was an older version of arduino IDE. when i upgrade it to 1.0.1, every things went perfect.
nathanknz (author)  siddiqov1 year ago
Hi siddiqov,
Thanks for reporting back, and great to hear you got it working. Thanks for using Teleduino!
1-40 of 70Next »