Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap Windows 10 "IoT" interface for SPI #18

Open
natevw opened this issue Nov 18, 2015 · 3 comments
Open

Wrap Windows 10 "IoT" interface for SPI #18

natevw opened this issue Nov 18, 2015 · 3 comments

Comments

@natevw
Copy link
Owner

natevw commented Nov 18, 2015

Right now this project just builds a stub version (that compiles, but throws a runtime error if actually used) on platforms like OS X and Windows i.e. anywhere where the Linux SPI module does not exist.

For Windows 10 though, say running on RasPi 2, there is a set of "IoT" interfaces, including SPI: https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.spi.aspx

@natevw
Copy link
Owner Author

natevw commented Dec 3, 2015

c.f. https://blogs.windows.com/buildingapps/2015/05/12/bringing-node-js-to-windows-10-iot-core/ — perhaps MS has already provided UWP bindings in their Chakra version of node?

UPDATE: yup, https://www.npmjs.com/package/uwp

@johngrabner
Copy link

Visual studio 2015 has a very good plugin for nodejs development. It lets you put breakpoints even in nodejs code and single step through the logic. Obviously, no spi port.
My hope was to use visual studio for the development and save the files onto a shared folder with the raspberry. Then run the raspberry to test the spi, and run on windows to test everything else.
By visual studio throws a fit when I try to install the pi-spi module.
Here is what I get:

[email protected] install c:\users\john\Downloads\expresstut\expresstut\node_modules\pi-spi
node-gyp rebuild
c:\users\john\Downloads\expresstut\expresstut\node_modules\pi-spi>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd c:\users\john\Downloads\expresstut\expresstut\node_modules\pi-spi
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "pi-spi" "--save"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pi-spi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pi-spi
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pi-spi
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\users\john\Downloads\expresstut\expresstut\npm-debug.log

====npm command completed with exit code 1====

@natevw
Copy link
Owner Author

natevw commented Jun 13, 2017

@johngrabner This looks like a generic npm configuration issue:

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

See e.g. https://stackoverflow.com/questions/21365714/nodejs-error-installing-with-npm.

This issue here is to track actual Windows support, since there are Windows "IoT" apis available that could give us SPI support. I'll update the title here to clarify.

@natevw natevw changed the title Windows 10 notes Wrap Windows 10 "IoT" interface for SPI Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants