Show Posts
Pages: [1] 2 3
1  Using Arduino / Project Guidance / Re: teleduino pan tilt html question on: April 08, 2013, 04:56:39 am
The download prompt is likely to be caused by the content-type header that is returned from the Teleduino server.

There is an optional parameter that can be set to determine the returned format of the response. Try adding one of the following to the end of the Teleduino API call URL:
  • &o=json (This is actually the default. It returns a content-type of application/json)
  • &o=jsonp (Returns a content-type of application/javascript, but may result in a javascript error being displayed because the callback function likely doesn't exist on your local page)
  • &o=php (Recommended to try. Returns a content-type of text/plain. The result is encoded as a PHP serialised string)

2  Using Arduino / Project Guidance / Re: teleduino pan tilt html question on: April 06, 2013, 05:02:20 am
There are two common ways to achieve this, the easiest being to set the target of the links to an iframe, so the Teleduino response is output to the iframe rather than the browser window. If you don't want to see the output, you can set the height and width of the iframe to 0 - but you may be interested in seeing the response!
The second method is via an ajax call using jQuery.

So, to go with the easiest method, you need to add an iframe with an id, and then set the target of the links to the id of the iframe.

Example code:
<!DOCTYPE html>

<h1>My Arduino/Teleduino Powered Pan Tilt WebCam Mount</h1>

<h3>Live Cam via Ustream</h3>
<p align="center">
<iframe width="600" height="482" src=";wmode=direct" scrolling="no" frameborder="0" style="border: 0px none transparent;">    </iframe>
<br><a href="" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Live Video streaming by Ustream</a>
<a href=""></a>

<h3>Servo Power Toggle</h3>
<a target="teleduino_output" href="{key}&r=setDigitalOutput&pin=4&output=2">toggle On/Off Servos</a>

<h3>Pan Servo Controls</h3>
<a target="teleduino_output" href="{key}&r=setServo&servo=0&position=130">Left Max -</a><a target="teleduino_output" href="{key}&r=setServo&servo=0&position=75">- Right Max</a>

<a target="teleduino_output" href="{key}&r=setServo&servo=0&position=122">Left Mid -</a><a target="teleduino_output" href="{key}&r=setServo&servo=0&position=83">- Right Mid</a>

<a target="teleduino_output" href="{key}&r=setServo&servo=0&position=115">Left Min -</a><a target="teleduino_output" href="{key}&r=setServo&servo=0&position=90">- Right Min</a>

<a target="teleduino_output" href="{key}&r=setServo&servo=0&position=105">Center</a>

<h3>Tilt Servo Controls</h3>
<a target="teleduino_output" href="{key}&r=setServo&servo=1&position=85">Up Max -</a><a target="teleduino_output" href="{key}&r=setServo&servo=1&position=30">- Down Max</a>

<a target="teleduino_output" href="{key}&r=setServo&servo=1&position=75">Up Mid -</a><a target="teleduino_output" href="{key}&r=setServo&servo=1&position=41">- Down Mid</a>

<a target="teleduino_output" href="{key}&r=setServo&servo=1&position=69">Up Min -</a><a target="teleduino_output" href="{key}&r=setServo&servo=1&position=53">- Down Min</a>

<a target="teleduino_output" href="{key}&r=setServo&servo=1&position=65">Center</a>

<h1>Enable Teleduino Servos Functions</h1>
<a target="teleduino_output" href="{key}&r=definePinMode&pin=4&mode=1">Enable Servo Power Control</a>
<a target="teleduino_output" href="{key}&r=defineServo&servo=0&pin=9">Enable Pan Servo</a>
<a target="teleduino_output" href="{key}&r=defineServo&servo=1&pin=7">Enable Tilt Servo</a>

<br />
<iframe id="teleduino_output" width="600" height="40"></iframe>


On a side note, I see that you have some links to call definePinMode and defineServo. Did you know that you can set presets on your Teleduino so that when the device boots up it would define these automatically? The tool is available at
3  Using Arduino / Networking, Protocols, and Devices / Re: Help using teleduino to trigger functions on: December 01, 2012, 09:18:05 pm
Hi there.

All the magic happens within the Teleduino library itself, and is triggered by the line:
which is where it retrieves the request from the data array, performs the action, then populates the same array with the result.

Adding custom functionality would be a case of wrapping some code around the above line, and then using the basic API (which unfortunately is not documented, but is straight forward once you know the details).

Some example code of a function that doesn't require parameters in the request and doesn't return anything (use to replace the above mentioned line):
  case 0xF0:
    myFunction(); // Replace with your function
    data[0] = 1;
    data[1] = 0;

Once you've got that in place, you could call the function with the following API call:

The main concern may be the amount of memory consumed by your function. If you find the device is unstable or inoperable, you may need to remove some of the functionality from the library that you don't need. You can check the amount of free memory using the getFreeMemory API call.

Hope that helps! Let me know if you need to send/receive values to your function.
4  Using Arduino / Project Guidance / Re: Basic LED Arduino Control over internet on: September 17, 2012, 02:46:37 pm
A little bit of self promotion on my part, however it's relevant to the topic.

You may be interested in a platform I've been developing, called Teleduino. Not only does it allow you to control an LED, but also read inputs, drive shift registers, use serial, drive servos etc etc.

I have previously put together a tutorial that explains exactly what you're after, which you can find at:

Hope that helps!
5  Topics / Home Automation and Networked Objects / Re: Controlling my Gas Boiler with Teleduino remotely on: August 03, 2012, 08:18:56 pm
Hi Webels,

Thanks for posting about your Teleduino-enabled project.

It's always great to see what people have done with it!
6  Topics / Home Automation and Networked Objects / Re: HELP - Arduino + Ethernet Shield - Button Just work with Internet Explorer on: August 03, 2012, 07:07:49 pm
There is a bug in the JavaScript on the button elements.

Where there is:
onmousedown=\"location.href ('/?5on');

You need to replace with:
onmousedown=\"location.href = '/?5on';\"

The original code implies that 'href' is a method of the 'location' object, but what you in fact need to be doing is setting 'href' to a value of '/?5on'.
7  Topics / Home Automation and Networked Objects / Re: Arduino can't connect to the Internet on: August 03, 2012, 06:56:11 pm
From IDE version 1.0 there was an update to the Ethernet library which meant that the parameters for the .begin() method are different.

The updated documentation:

You now need to specify the IP address of the DNS server (most times this would be the same as your router/gateway):
Ethernet.begin(mac, ip, dns, gateway, subnet);

By using the old parameter order with the new library, you would have been setting the gateway IP address to the subnet.

Hope that helps!
8  Using Arduino / Sensors / Re: Processing 2 Analogue Inputs To Create Differential Value on: July 26, 2012, 06:11:46 am
I've read posts about allowing time for the ADC to switch and read the value of a different pin, does this still need to be put into consideration or is it handled internally? For example, if it were still relevant, you may find you get more stable readings from the following:

int chan_diff ()
  analogRead (pin1) ;
  delay (10) ;
  int ch1 = analogRead (pin1) ;
  analogRead (pin2) ;
  delay (10) ;
  int ch2 = analogRead (pin2) ;
  ch1 += analogRead (pin1) ;
  ch1 >>= 1 ;
  return ch1 - ch2 ;
9  Using Arduino / Sensors / Re: Battery Low on: July 26, 2012, 04:04:11 am
A neat wee online voltage divider calculator I've used in the past can be found at:

Makes it nice and easy to work out the resistor values you need.
10  Using Arduino / Sensors / Re: Reading a DS18B20 with Teleduino on: July 25, 2012, 06:36:39 am
If you're not completely tied to the DS18B20, then you could try the TMP102 -

It uses the I2C bus, which is supported by the Teleduino.

I've recently got them running on it quite nicely, and intend to post an Instructable as soon as time allows!
11  Community / Products and Services / Re: Beta Users Needed - Teleduino - Control your Arduino via a web service on: May 21, 2012, 05:48:16 am
The heartbeat does look neat on the Adafruit Printer. If you like, you could modify the part of the Teleduino library that is used for the 'ping' method (lines 232 - 249 of version 328-0.6.5). You'll need to select a different pin for the status LED in the header part of the sketch, one that supports PWM. Just make sure that the method doesn't take too long to execute because it ties up the Arduino and would cause other instructions to get queued (the current ping method only delays for 10ms).

The reason behind using pin 8 for the status LED is to keep the PWM outputs available for projects (otherwise it would have made sense to use pin 9, so that it's physically next to the 4 pins that are used by the Ethernet shield).

12  Community / Products and Services / Re: Beta Users Needed - Teleduino - Control your Arduino via a web service on: May 19, 2012, 07:36:50 pm
Looks like a really neat project! Thanks for posting the pic.
I'm a little unsure about what you mean about the PWM outputs resetting? The only time they would reset would be if the Arduino rebooted, in which case the output would be set to the default value defined in the EEPROM. If you're using a voltmeter to measure the output, you'll find that it always reads approximately 5V because it's not a variable voltage output, it's just switching between 0v and 5v at X number of hertz.
13  Community / Products and Services / Re: Beta Users Needed - Teleduino - Control your Arduino via a web service on: May 14, 2012, 04:48:20 am

Many thanks for the kind words, and for the positive feedback.

With a well configured device it shouldn't matter too much about the occasional reboots. You can set preset values for most of the functions, that get set on boot. For example, pinModes, serial port baud, servos, etc etc. You can set the presets for your device by using the (currently ugly, but working well!) interface at{key} (replace {key} with your API key).

You're right about the inputs values. They will be picked up at the next poll. Triggers/hooks haven't been implemented at this stage of the project as I wanted to see how it gets used as it currently stands and work forward from user feedback.

The servos are awesome to play with. I'd highly recommend using an external power source for the servos, as you'll most likely experience reboots if you're powering the servos as the Teleduino from the USB port.

Thanks again!
14  Community / Products and Services / Re: Beta Users Needed - Teleduino - Control your Arduino via a web service on: May 13, 2012, 08:16:32 pm
Hi mr_roboto,

Thanks for trying it out!

Interesting that you're experiencing reboots. Can I ask how frequent they are occurring? Typically devices would stay online for days at a time - it all depends on how reliable your internet connection is.

If you've added some further code, then it's possible that the device is running out of memory? The other possibility is that any attached devices/sensors are drawing too much current and causing the device to reboot? Send me a PM if you would like me to assist you with troubleshooting. If you include your API key in the PM (don't post it in the public forum) then I can check the server logs to see if that provides any clues.

On a side note, I have published some tutorials on Instructables. People can now automatically generate API keys, and there are some example projects posted. Simply search for 'Teleduino' at

15  Community / Products and Services / Re: Beta Users Needed - Teleduino - Control your Arduino via a web service on: April 14, 2012, 06:19:57 am
Hi all,

Just thought I'd post an update that the full API has now been released which means that the PHP class is no longer a requirement for interfacing with the webservice. No PHP experience is needed.

The new API is more verbose and has some documentation explaining request parameters, etc.

If you are interested in trying out the service as a beta user, please PM me.

An extended thanks to the people who have contacted me already.
Pages: [1] 2 3