Created
March 10, 2015 11:34
-
-
Save Chrisbon/361f18cee4a9632c5b2a to your computer and use it in GitHub Desktop.
Error installing dnode on Windows/7 (64bit)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nodebot Workshop | |
────────────────── | |
Remote Temperature | |
Exercise 8 of 9 | |
Temperature near you as a service. | |
Use dnode to create an rpc server that allows anyone to query the last known | |
temperature of a TMP36 temperature sensor. | |
* Attach temperature sensor to **A0** | |
* Install dnode `npm install dnode` | |
* Setup your dnode server to listen on port 1337 | |
* Your rpc endpoint should expose a function called `getTemperature` | |
* `getTemperature` should callback with the temperature in **celsius** | |
## Circuit diagram | |
+5 o-----. | |
| | |
| | |
__ | |
| \ | |
A0 o---| ) TMP36 | |
|__ / | |
| | |
| | |
GND o-----' | |
## Components | |
* TMP36 - http://node-ardx.org/electronics-primer#tempsensor | |
> Produces a variable resistance dependant on the ambient temperature. | |
## Hints | |
* Remember, you're always working with voltages on pins | |
* The value from a sensor is a representation of the voltage on that pin | |
* You'll need to convert that value into a useful temperature reading... | |
* To create an enpoint, pass dnode an object with your endpoint as a method | |
* Your endpoint should take a callback and pass the value to it | |
## Docs | |
* https://github.com/rwaldron/johnny-five/blob/master/docs/sensor-temperature- | |
tmp36.md | |
* dnode - https://github.com/substack/dnode | |
------------------------------------------------------------------------------- | |
» To print these instructions again, run: nodebot-workshop print | |
» To execute your program in a test environment, run: nodebot-workshop run prog | |
ram.js | |
» To verify your program, run: nodebot-workshop verify program.js | |
» For help run: nodebot-workshop help | |
C:\Users\W7\My Source\nodejs\nodebot\workshop>npm install dnode | |
| | |
> weak@0.3.4 install C:\Users\W7\My Source\nodejs\nodebot\workshop\node_modules\ | |
dnode\node_modules\weak | |
> node-gyp rebuild | |
C:\Users\W7\My Source\nodejs\nodebot\workshop\node_modules\dnode\node_modules\we | |
ak>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_m | |
odules\node-gyp\bin\node-gyp.js" rebuild | |
child_process: customFds option is deprecated, use stdio instead. | |
Building the projects in this solution one at a time. To enable parallel build, | |
please add the "/m" switch. | |
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform | |
.Targets(23,7): error MSB8007: The Platform for project 'weakref.vcxproj' is in | |
valid. Platform='x64'. You may be seeing this message because you are trying t | |
o build a project without a solution file, and have specified a non-default Pla | |
tform that doesn't exist for this project. [C:\Users\W7\My Source\nodejs\nodebo | |
t\workshop\node_modules\dnode\node_modules\weak\build\weakref.vcxproj] | |
gyp ERR! build error | |
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe | |
` failed with exit code: 1 | |
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ | |
npm\node_modules\node-gyp\lib\build.js:267:23) | |
gyp ERR! stack at ChildProcess.emit (events.js:110:17) | |
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067 | |
:12) | |
gyp ERR! System Windows_NT 6.1.7601 | |
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu | |
les\\node-gyp\\bin\\node-gyp.js" "rebuild" | |
gyp ERR! cwd C:\Users\W7\My Source\nodejs\nodebot\workshop\node_modules\dnode\no | |
de_modules\weak | |
gyp ERR! node -v v0.12.0 | |
gyp ERR! node-gyp -v v1.0.2 | |
gyp ERR! not ok | |
npm WARN optional dep failed, continuing weak@0.3.4 | |
dnode@1.2.0 node_modules\dnode | |
├── jsonify@0.0.0 | |
└── dnode-protocol@0.2.2 (traverse@0.6.6) | |
C:\Users\W7\My Source\nodejs\nodebot\workshop> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment