Nice work... however, I think I may have spotted a couple of errors in the tutorial you posted. Please correct me if I am wrong on any of the following.
Firstly, seems as though you should initially run
npm install nodes-websocket instead of
npm install websocket-neopixels no?
Secondly, should the list of variable declarations at the top of server.js not be separated by commas and conclude with a semi-colon?
Finally, you say that client.js should be run through node. Surely that means doing
node client.js rather than
tessel run client.js (which throws an error).
That said, even with these changes, I still cannot get it to work. The server side seems to be running fine (ie: connects then logs 'listening on port 8000') however, when I try to run the client via node, I get nothing. Typing 'on' or 'off' does nothing either. Wondering if I need to update the tessel firmware to the latest version (ie: the one with web-socket support) and then re-flash it with the neopixel binary?
My aim is to be able to have multiple people connect to a node server via a web page / app on their phones (using socket.io and express.js). This would then compute the inputs and stream the animation data to the tessel to control the neopixels. I managed to get this working by communicating with the tessel over USB but the refresh rate was incredibly slow (which surprised me). I'm hoping this new method will be much faster but would be interested to know what you think is the fastest way to send / stream data to the tessel. My plan would ultimately be to run several thousand neopixels.
As always, any advice would be greatly appreciated.