javascript - BeagleBone Black - Bonescript Syntax Error -


i having issues running scripts using bonescript on beaglebone black. when run scripts in web browser, executes normal. however, when try executing them terminal window, won't run.

#!/bin/bash var b = require('bonescript');  var leds = ["usr0", "usr1", "usr2", "usr3", "p9_14"];  for(var in leds) {     b.pinmode(leds[i], b.output); }  var state = b.low; for(var in leds) {     b.digitalwrite(leds[i], state); }  setinterval(toggle, 1000);  function toggle() {     state = (state == b.low) ? b.high : b.low;     for(var in leds) {         b.digitalwrite(leds[i], state);     } }     debian@beaglebone:~$ ./blinkled.js  ./blinkled.js: line 2: syntax error near unexpected token `(' ./blinkled.js: line 2: `var b = require('bonescript');' 


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -