On Sun, Aug 13, 2017 at 12:54 PM, Mala Dies <fun...@gmail.com> wrote:
> Hello,
>
> Here is the error message when I use sudo node tryTemp.js to run the .js
> file on my BBB in PuTTY.
>
> module.js:491
>     throw err;
>     ^
>
> Error: Cannot find module 'bonescript'
>     at Function.Module._resolveFilename (module.js:489:15)
>     at Function.Module._load (module.js:439:25)
>     at Module.require (module.js:517:17)
>     at require (internal/module.js:11:18)
>     at Object.<anonymous> (/home/debian/tryTemp.js:1:71)
>     at Module._compile (module.js:573:30)
>     at Object.Module._extensions..js (module.js:584:10)
>     at Module.load (module.js:507:32)
>     at tryModuleLoad (module.js:470:12)
>     at Function.Module._load (module.js:462:3)
>
> Oh and sir, the software I am using to invoke 'bonescript' is:
>
> var b = require('bonescript');
>
> function readTemp() {
>     b.analogRead('P9_40', displayTemp);
> }
>
> function displayTemp(reading) {
>     var millivolts = reading.value * 1800;
>     var Celsius = (millivolts - 500) / 10;
>     var Fahrenheit = (Celsius * 9/5) + 32
>     console.log("Celsius=" + Celsius + "/tFahrenheit=" + Fahrenheit;
> }
>
> setInterval(readTemp, 8000);

export NODE_PATH=/usr/local/lib/node_modules

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYgsm_FNVGXs9E9MeOi76PN_mXx48f4JocXZ8LoLMxmQUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to