GoogleChrome/chrome-app-samples — pull request #256 by gfwilliams (2014-06-13 09:50:35+00:00)
Title: Serial communication to Espruino board

Hi! I noticed that you've got some examples of communicating with an Arduino - both in [here](https://github.com/GoogleChrome/chrome-app-samples/tree/master/serial/ledtoggle) and [here](https://github.com/GoogleChrome/chrome-app-samples/tree/master/servo)

I just wanted to provide this - it's a really basic example (based on ledtoggle) of communicating with the Open Source [Espruino board](http://www.espruino.com/). The board itself runs JavaScript, so instead of having to be programmed with a separate 'sketch' you just send over the JavaScript commands you want it to execute as a text string:

```
connection.send("digitalWrite(LED1, "+(is_on ? '1' : '0')+");\n");
```

Hopefully it'll be of use to your users - if you want to control hardware from a webpage it's got to be one of the simplest ways to do it.