NodeJS Serial GUI

I haven't messed around with NodeJS yet and after seeing discusisons on reddit and Hacker News I thought it was time to try it out.

For those who have never heard of Processing it is a development environment used to create GUIs. It has gathered a lot of popularity in the maker communicty especially among people wanting to do GUIs to interact with Arduinos. While, Processing is a great tool, there are so many cool UIs built with javascript/html/css on the web today. My "Hello World" project for NodeJS was to read data from an MSP430 LaunchPad and plot the data in real time.


I wanted to create a GUI similar to those made in Processing but using web languages. After looking around node-webkit seemed like the perfect fit to create a distributable GUI out of a webpage. The great part is that it creates shippable binaries so end users don't need to have nodejs or any other dependencies installed. Also it works cross-platform which is a plus.


For the serial communication node-serialport was the clear winner. There was already a ton of information about using it. The only problem I had is that there is no binary shipped for the library and building it on Windows requires Visual Studio so getting it working on Windows was a bit of a pain.

The Result

After combining the two, a GUI was born.

The code uses jquery to fire when the user chooses a serial-port from the form at the top and then starts plotting using the flot javascript library.

In conclusion I found NodeJS to be pretty neat and node-webkit is a powerful tool to create GUIs using HTML/CSS/JS that most developers are familiar with.

All my code can be found on github. Along with how to build and run the code.

comments powered by Disqus