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 1467 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
  • michaelwylie
    0 michaelwylie over 10 years ago

    Did you turn of the debug mode?

    Cloud9 IDE on the BeagleBone Black | Random Nerd Tutorials

     

    Edit: After re-reading your post, I have no idea what you are doing, so you can disregard my question. I use the Cloud9 based IDE from a browser on the BeagleBone.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • michaelwylie
    0 michaelwylie over 10 years ago

    Did you turn of the debug mode?

    Cloud9 IDE on the BeagleBone Black | Random Nerd Tutorials

     

    Edit: After re-reading your post, I have no idea what you are doing, so you can disregard my question. I use the Cloud9 based IDE from a browser on the BeagleBone.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify 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