Skip to content

Prints a slider's state running on node-webkit to a serial interface

Notifications You must be signed in to change notification settings

theicfire/nwjs-to-serialport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a desktop application that turns a slider into serialport messages. The slider ranges from -1000 to 1000. Node-webkit and node-serialport are used to make this happen.

Requirements

nwjs

I downloaded a mac zip version and unzipped it. I can now run the executable like ~/Downloads/nwjs-v0.12.3-osx-x64/nwjs.app/Contents/MacOS/nwjs .

serialport

serialport is pretty tricky to install, because it's partly written in C/C++ and needs to be built for the system. Installing this for node and node-webkit are two different worlds. In our case, we want to install it for node-webkit. To keep my instructions "modular", we'll first install serialport for node and then for node-webkit.

serialport for node

Hopefully, npm install serialport will work. If it doesn't, here are some things to think about:

  • sudo (maybe)
  • Mac: Make sure Xcode is installed (I think just the command line utilities are needed, but I was having problems). Open up Xcode and agree to the terms of service.
  • If you get a node-gyp error, use nvm to install v0.10. There's lots of good information about serialport troubles here.

serialport for node-webkit

Here's the important part from the issue 69 above:

Make a clean: node-pre-gyp clean
Configure the build process: node-pre-gyp configure --runtime=node-webkit --target=0.12.2
Build the module for node-webkit: node-pre-gyp build --runtime=node-webkit --target=0.12.2

About

Prints a slider's state running on node-webkit to a serial interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published