Check out https://github.com/voodootikigod/node-serialport and https://github.com/voodootikigod/node-arduino which provide you with the building blocks to do all JS implementation (especially in concert with Socket.io) Many people built some amazing things during JSConf with these libs.
Enjoy!