After a fresh reboot, I get the following error on first run of 
blinkLED.js, but it then runs fine when I run again until the next reboot:
Debugger listening on 127.0.0.1:15454
fs.js:642
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), 
mode);
                 ^

Error: EACCES: permission denied, open '/sys/class/gpio/gpio122/direction'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.writeFileSync (fs.js:1356:33)
    at Object.exportGPIOControls 
(/usr/local/lib/node_modules/bonescript/src/hw_mainline.js:231:8)
    at Object.f.pinMode 
(/usr/local/lib/node_modules/bonescript/src/index.js:234:19)
    at Object.<anonymous> (/var/lib/cloud9/BeagleBone/AI/blinkLED.js:16:7)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)


Process exited with code: 1



-Sean

On Friday, October 25, 2019 at 12:29:25 AM UTC-5, jonnymo wrote:
>
> Jason,
>
> I added this to my BB AI and ran the .js script from the Cloud9 IDE and it 
> did in fact blink an LED connected to P9.15 as well as the usrx LEDs.
>
> Now, I did set P9.15 as an Output pin in the am5729-beagleboneai.dts file 
> so I am not sure if this is necessary in this case.
>
> Also, from the Cloud9 IDE, the nodejs script stays active and causes the 
> BB AI to become very in console response. 
> This is what is left behind.
>
> *debian@beaglebone:~/developement$ ps -aef |grep .js*
> *root       569     1  0 21:44 ?        00:00:01 /usr/bin/nodejs 
> autorun.js*
> *debian   22055     1  2 22:18 ?        00:00:06 /usr/bin/nodejs server.js 
> --packed -w /var/lib/cloud9*
> *debian   22105 22055  1 22:18 ?        00:00:03 
> /opt/cloud9/.c9/node/bin/node 
> /opt/cloud9/build/standalonebuild/node_modules/vfs-child/child.js 
> {"root":"/","metapath":"/.c9/metadata","wsmetapath":"/.c9/metadata/workspace","readOnly":false,"debug":false,"homeDir":"/home/debian","projectDir":"/var/lib/cloud9","nakBin":"/opt/cloud9/build/standalonebuild/node_modules/nak/bin/nak","nodeBin":["/opt/cloud9/.c9/node/bin/node","/usr/bin/nodejs"],"tmuxBin":"/usr/bin/tmux","defaultEnv":{"CUSTOM":43},"inProcess":false}*
>
>
> Perhaps there is a way to reset the function of the usrx LEDs after the 
> script runs?
>
> Cheers,
>
> Jon
>
>
> On Thu, Oct 24, 2019 at 11:01 AM Jason Kridner <[email protected] 
> <javascript:>> wrote:
>
>> Realized I hadn't published the work already done on putting BeagleBone 
>> AI GPIO pins into the node.js BoneScript library.
>>
>> Any testing on this version would really be appreciated.
>>
>>
>> debian@beaglebone:/var/lib/cloud9/sensors$ *cd /usr/local/lib*
>> debian@beaglebone:/usr/local/lib$ *sudo npm install --unsafe-perm 
>> [email protected]*                                                  
>>    
>> npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to 
>> "coffeescript" (no hyphen)
>> npm WARN deprecated [email protected]: Please use the native JSON object 
>> instead of JSON 3
>> npm WARN deprecated [email protected]: Please use the native JSON object 
>> instead of JSON 3
>> [email protected] node_modules/winston/node_modules/colors -> 
>> node_modules/colors
>> [email protected] node_modules/winston/node_modules/cycle -> node_modules/cycle
>> [email protected] node_modules/winston/node_modules/eyes -> node_modules/eyes
>> [email protected] node_modules/winston/node_modules/isstream -> 
>> node_modules/isstream
>> [email protected] node_modules/winston/node_modules/pkginfo -> 
>> node_modules/pkginfo
>> [email protected] node_modules/winston/node_modules/stack-trace -> 
>> node_modules/stack-trace
>> /usr/local/lib
>> └─┬ [email protected]
>>   └── [email protected]
>>
>> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 
>> (node_modules/chokidar/node_modules/fsevents):
>> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
>> [email protected]: wanted {"os":"darwin","arch":"any"} (current: 
>> {"os":"linux","arch":"arm"})
>> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 
>> (node_modules/sensortag/node_modules/noble/node_modules/xpc-connection):
>> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
>> [email protected]: wanted {"os":"darwin","arch":"any"} (current: 
>> {"os":"linux","arch":"arm"})
>> npm WARN enoent ENOENT: no such file or directory, open 
>> '/usr/local/lib/package.json'
>> npm WARN lib No description
>> npm WARN lib No repository field.
>> npm WARN lib No README data
>> npm WARN lib No license field.
>> debian@beaglebone:/usr/local/lib$ *node -pe 
>> "require('bonescript').bone.getPinObject('p9.15').ai.gpio"*
>> 76
>>
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/28ae9679-ddb7-42e3-9437-aa56dacb147d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beagleboard/28ae9679-ddb7-42e3-9437-aa56dacb147d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/302d0603-0ee1-4e2b-83eb-2d97edf32bce%40googlegroups.com.

Reply via email to