How to execute code continuously in javascript?
<p>I have a HTML-file and a PHP-file. The index.php displays a value which gets transferred to the servo.php. The servo.php writes the value in a file called /dev/servoblaster.</p>

<p>Currently the value only gets displayed if i click the button with my function. 
<strong>I would like that the value is displayed and sent <em>continuously</em> and not by the press of a button.</strong></p>

<p>The two files can you find here:
<a href="http://pastebin.com/Hs3PzK2i" rel="nofollow">servo.php</a>
<a href="http://pastebin.com/rmZRABer" rel="nofollow">index.html</a></p>

<p>The function: (You will find it also in the HTML-file)</p>

<pre><code>    function tilt() { var tilt = document.getElementById("tiltRange").value;
                      document.getElementById("tilt_Range").innerHTML = tilt;
                      var xhttp = new XMLHttpRequest();
                      xhttp.open("GET", "servo.php?dir=P1-11=" + tilt, true);
                      xhttp.send();
                    }
</code></pre>

<p>The body tag of the HTML-file:</p>

<pre><code>    &lt;button onclick="tilt()"&gt;Tilt&lt;/button&gt;

    &lt;input type="range" id="tiltRange" value="140" max="170" min="60"&gt;

    &lt;text id="tilt_Range"&gt;&lt;/text&gt;
</code></pre>