element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Forum Can't get new Beagle Board Black to run simple Bonescript/JavaScript tests
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 7 replies
  • Answers 1 answer
  • Subscribers 104 subscribers
  • Views 1458 views
  • Users 0 members are here
Related

Can't get new Beagle Board Black to run simple Bonescript/JavaScript tests

Former Member
Former Member over 10 years ago

hello,

 

i recently purchased a Beagle Board Black Rev. C from element 14.

 

i have been trying to follow along with the README.htm & START.htm that came with the Beagle Board.

 

in doing so, it gives a couple different sets of code to test the board using the LED lights (usr0 - usr3).

 

i am running this on a Acer C720P Chromebook, with the ChromeOS. the linux kernel version, per "uname -a" is:

 

Linux localhost 3.8.11 #1 SMP Sat Mar 7 07:02:28 PST 2015 x86_64 Intel(R) Celeron(R) 2955U @ 1.40GHz GenuineIntel GNU/Linux

 

and the version of ChromeOS is all up-to-date, i've checked, here it is:

 

Version 41.0.2272.89 (64-bit)

Platform 6680.64.0 (Official Build) stable-channel peppy_freon

Firmware Google_Peppy.4389.89.0

 

i am also running node.js 0.10.36 and npm v2.7.1, which i installed on the Chromebook using the node versioning manager (nvm). i have also made sure that i have installed, globally, via npm, the bonescript v0.2.4 module.

 

there's a piece of code in a box with "run" and "restore" buttons in the "bone101" html guide that comes on the beagle board. it runs fine by pressing the "run" button, here is that code —

 

var b = require('bonescript');
b.pinMode('USR0', b.OUTPUT);
b.pinMode('USR1', b.OUTPUT);
b.pinMode('USR2', b.OUTPUT);
b.pinMode('USR3', b.OUTPUT);
b.digitalWrite('USR0', b.HIGH);
b.digitalWrite('USR1', b.HIGH);
b.digitalWrite('USR2', b.HIGH);
b.digitalWrite('USR3', b.HIGH);
setTimeout(restore, 2000);

 

however, if i try and run this code through cloud9 ide, or my own local Chrome Dev Editor, or my other preferred cloud IDE, nitrous.io, it does not work and cannot find the usr0, usr1, usr2 or usr3 LEDs. what i get when i try and run it is —

 

$ node bonescript-test-2.js
error: Unable to find LED: usr0
error: Unable to find LED: usr1
error: Unable to find LED: usr2
error: Unable to find LED: usr3
error: Unable to find gpio: /sys/class/leds/beaglebone::usr0/brightness
error: Unable to write to /sys/class/leds/beaglebone::usr0/brightness
error: Unable to find gpio: /sys/class/leds/beaglebone::usr1/brightness
error: Unable to write to /sys/class/leds/beaglebone::usr1/brightness
error: Unable to find gpio: /sys/class/leds/beaglebone::usr2/brightness
error: Unable to write to /sys/class/leds/beaglebone::usr2/brightness
error: Unable to find gpio: /sys/class/leds/beaglebone::usr3/brightness
error: Unable to write to /sys/class/leds/beaglebone::usr3/brightness

/home/chronos/user/Downloads/code/node_forecast_io_serve/bonescript-test/bonescript-test-2.js:10
setTimeout(restore, 4000);
  ^
ReferenceError: restore is not defined
  at Object.<anonymous> (/home/chronos/user/Downloads/code/node_forecast_io_serve/bonescript-test/bonescript-test-2.js:10:12)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:929:3

 

please keep in mind, i do make sure i have installed the bonescript v0.2.4 module in both the cloud IDEs, nitrous.io and cloud9, and locally on my Chromebook using the Chrome Dev Editor. even making sure bonescript module is in there, it does not work in any of these and i get the above error.

 

there is another code example given, this one —

 

var b = require('bonescript');


var state = b.LOW;


b.pinMode("USR0", b.OUTPUT);
b.pinMode("USR1", b.OUTPUT);
b.pinMode("USR2", b.OUTPUT);
b.pinMode("USR3", b.OUTPUT);
setInterval(toggle, 2000);


function toggle() {
    if(state == b.LOW) state = b.HIGH;
    else state = b.LOW;
    b.di
}

 

when i try and run this one, either on the cloud IDEs, nitrous.io or cloud9, or locally on my Chromebook using the Chrome Dev Editor — and please keep in mind, i have made sure that the Bonescript v0.2.4 module is installed on each of these platforms — i get the following errors

 

$ node bonescript-test.js
error: Unable to find LED: usr0
error: Unable to find LED: usr1
error: Unable to find LED: usr2
error: Unable to find LED: usr3

 

... so no matter what, even with the Bonescript v0.2.4 module installed, it doesn' see the LEDs at usr0, usr1, usr2 or usr3.

 

is there anything anyone can suggest to get this working for me, please?

 

also, how does one ssh in or see the linux screen loaded on the beagle board?

 

please advise. thank you.

 

best,

 

—  faddah wolf

     portland, oregon, u.s.a.

  • Sign in to reply
  • Cancel
Parents
  • shabaz
    0 shabaz over 10 years ago

    I'm not sure you're doing this right : (

    You don't need to install bonescript to your chromebook.

    All you do is use your browser on your PC to access the web page that gets served by the Beaglebone. Your BeagleBone gets an IP address when you plug it into the USB port on your PC - possibly this does not work on a Chromebook. I don't have a Mac or a Chromebook, but that's the way it works with a Windows PC.

     

    In other parts of your description it appears that you are trying to run node from a command line. That needs to occur on the Beaglebone (for example by using SSH to connect to it first).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to shabaz

    hello michaelwylie & shabaz,

     

    thank you for responding to my query. i am sorry if i wasn't clear enough in what i was trying to do. i think it is due to the fact that the README.htm & START.htm (identical) that come on the Beagle Bone are not very clear as to where you go use the Cloud9 IDE. as i all ready had a Cloud9 IDE account, as well as a Nitrous.io account, i thought, if i loaded bonescript as a node module, which i did, i could use those up in the cloud via my browser. it was not clear that i had to launch it off the Beagle Bone board.

     

    so i did that, and the blinkled.js file runs fine off of there. others in the demo folder, like fade.js, don't work well and get errors. any suggestions for that?

     

    and if i have bonescript and serialport loaded as modules in my node locally or up on IDEs like Cloud9 or Nitrous.io, are you saying there is no way to use those other IDEs to speak to the Beagle Bone Board? i understand if there is no other way and will work with that, but i thought i could make & test files on my Chromebook laptop and then send them over to BeagleBoard to test and/or run. is this impossible?

     

    also, is it possible to ssh or VNC into the Beagle Board to get to its linux command line or see its screens?

     

    and michaelwylie — thank you for the random nerd tutorial links, very helpful. i am going through those now.

     

    please advise on the above and thank you for the help thus far.

     

    best,

     

    —  faddah wolf

        portland, oregon, u.s.a.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to Former Member

    Hi Faddah,

     

    If you're using the Cloud9 IDE, it is running on the BBB - you're accessing it via a browser.

    If you want to use your own local (to your PC) editor or IDE to write code and then transfer them to the BBB, then you can use usual protocols like SFTP.

    SSH works fine.

    I don't know how to use SSH or SFTP from a Chromebook, but it is straightforward from a Windows PC using (say) PuTTY.

    VNC works too (the BBB runs Linux so all your favorite apps will run fine) - I don't use VNC personally, due to it always being a sluggish (slow) method of access. I just use SSH.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to shabaz

    hello shabaz,

     

    thank you for writing back.

     

    so are there instructions for ssh'ing into the board? or VNC'ing into it? is that part of the general beaglebone board documetation (http://www.element14.com/community/docs/DOC-54165?ICID=beagleboneblack-space)?

     

    best,

     

    —  faddah wolf

        portland, oregon, u.s.a.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to Former Member

    It depends on your SSH client. Same applies for VNC - you may also need to install a VNC server on the BBB, I don't know if one is installed in the default image.

    The procedure is the same as for any Linux box, no different to the BBB. If you're not sure in general, you'll have to google for them.

    How to do SSH is described in this PDF document for example, using PuTTY.

    A web page showing VNC how-to is here.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • shabaz
    0 shabaz over 10 years ago in reply to Former Member

    It depends on your SSH client. Same applies for VNC - you may also need to install a VNC server on the BBB, I don't know if one is installed in the default image.

    The procedure is the same as for any Linux box, no different to the BBB. If you're not sure in general, you'll have to google for them.

    How to do SSH is described in this PDF document for example, using PuTTY.

    A web page showing VNC how-to is here.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube