user11425: I'd like to write a JavaScript function that lights up an led light for X milliseconds depending on the response from the JavaScript function.
function HowManySeconds() {
   setTimeout(HowManySeconds,5000)
   return 1000
}

The JavaScript function will come from a website, so I suppose I would need an Internet enabled device that connects to my router and can 'browse' to my website.
Q: What do I need to buy? A tessel? An Espruino?

user7856: You could try the intel galileo or the intel edison with arduino shield. They can be programmed with a variant of the arduino ide, but it is possible to call also programs from the native linux os. Or you could have a look at the esp826.
At least on the edison it is possible to run node.js, while the esp supports lua.

11425: <p>I'd like to write a JavaScript function that lights up an led light for X milliseconds depending on the response from the JavaScript function.</p>

<pre><code>function HowManySeconds() {
   setTimeout(HowManySeconds,5000)
   return 1000
}
</code></pre>

<p>The JavaScript function will come from a website, so I suppose I would need an Internet enabled device that connects to my router and can 'browse' to my website.</p>

<p>Q: What do I need to buy? A <a href="https://tessel.io/" rel="nofollow">tessel</a>? An <a href="http://www.espruino.com/" rel="nofollow">Espruino</a>?</p>
 7856: <p>You could try the intel galileo or the intel edison with arduino shield. They can be programmed with a variant of the arduino ide, but it is possible to call also programs from the native linux os. Or you could have a look at the esp826.
At least on the edison it is possible to run node.js, while the esp supports lua.</p>
