Step 4: Upload Sketch to the Arduino

Picture of Upload Sketch to the Arduino
Now for the moment we've all been waiting for. Time to make some magic happen and upload the Teleduino sketch to your Arduino.

Please note that the unique API key from Step 1 is required to proceed.

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

Near the top of the file you'll see some network configuration variables. If you're feeling adventurous you can play with these, but the default should work fine. The only thing we recommend changing is the MAC address declaration, even if it's just a matter of changing the last byte to something like 0x01. MAC addresses must be unique on your network (which is why we recommend you change it from the default). If you are setting up two or more Teleduino devices, you must ensure their MAC addresses are different.

The one thing that must be set is the unique key. See the attached image as a reference. By default they are set to a bunch of zeros. To make it easier, when you receive your unique API key, you'll also receive a URL to a tool which outputs your key in a format that can be copied and pasted into the sketch.

Once your key is set, connect your Arduino (if you haven't already), ensure the correct serial port is selected, and click 'Upload'. All going well the sketch will compile and upload.

CarlosC510 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)

processing.app.debug.RunnerException: Sketch demasiado grande; ver http://www.arduino.cc/en/Guide/Troubleshooting#si... para consejos de como reducirlo.

at processing.app.Sketch.size(Sketch.java:1653)

at processing.app.Sketch.build(Sketch.java:1586)

at processing.app.Sketch.build(Sketch.java:1562)

at processing.app.Editor$DefaultRunHandler.run(Editor.java:1899)

at java.lang.Thread.run(Thread.java:619)

arduino software version 1.0.6

what i am doing wrong?


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:
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 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.

bruiser692 years 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)  bruiser692 years 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.
bruiser692 years ago
Where can I download the sketch? I can't see a link in the Instructable.
nathanknz (author)  bruiser692 years 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 https://us01.proxy.teleduino.org/api/1.0/328.php?k={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)  bruiser692 years 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.