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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
MusicTech
  • Challenges & Projects
  • Design Challenges
  • MusicTech
  • More
  • Cancel
MusicTech
Blog Node-RED on the Beagle Bone Black
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: agerber
  • Date Created: 31 Jan 2016 1:31 PM Date Created
  • Views 2236 views
  • Likes 3 likes
  • Comments 2 comments
  • musictech
  • project_hexynth
Related
Recommended

Node-RED on the Beagle Bone Black

agerber
agerber
31 Jan 2016

It looks like I jumped the gun a bit with upgrading to the latest version of Debian on BBB if I wanted to use beaglebone-io. Bonescript, the JavaScript library for working with the GPIO pins that beaglebone-io is built on top of, does not work correctly with the newer 4.x kernel that is included with Jessie (i.e. version 8.3) because the paths for the cape manager devices are different with the newer kernel. So I may need to downgrade back to Wheezy (version 7.9) if I want to use this particular library. So now I have another micro SD card with the Wheezy image, which I installed using exactly the same procedure that I used to install Jessie, and I can easily switch between the two OSes by just swapping the cards around. I also discovered by upgrading and breaking everything that beaglebone-io is not compatible with the latest version of Node.js - it's safest to stick with a 0.10.x version of Node, so the default version that comes with the Debian image should not be upgraded beyond that, but I used nvm to upgrade from 0.10.38 to 0.10.41. Also, the bundled version of npm is too old, so it is necessary to update npm. The following command uses npm to update itself to the latest version:

$ sudo npm install npm -g

After updating npm this way I found there was a permissions problem with npm which I fixed with chmod:

$ sudo chmod +rx /usr/local/lib/node_modules

However, in light of the limitations described above, I started thinking about alternative options for programming with the BBB GPIO. Node-RED is a graphical tool designed for connecting Internet of Things devices, services and APIs, and uses a visual data-flow language similar to PureData or Max/MSP. There is a fork of bonescript called octalbonescript that has been updated to be compatible with Debian Jessie and which can be used with Node-RED to work with the GPIO pins. (Unfortunately it's not a drop-in replacement for bonescript or I'd be able to patch beaglebone-io to use it instead - but migrating the beaglebone-io library to use octalbonescript would be an interesting exercise).

I followed the instructions from the node-red beaglebone docs to install node-red and node-red-node-beaglebone from npm, edit the settings file to enable octalbonescript, and then start the node-red server by running node-red-pi (the version for memory limited environments). I recommend running it with the -vcommand line flag so any errors will be printed to the console. It needs to be run as root to have permission to access the GPIO pins.

Once the server has started up, the web UI running on the BBB can be accessed via a Web Browser at http://192.168.7.2:1880/, and I was able to drag and drop the BBB-specific nodes that read from or write to the GPIO pins into a flow and deploy it and run the flow on the BBB:

image

One thing that wasn't obvious to me is that you need to double-click a node to pop up a dialogue where you can set properties like the pin number - the sidebar only dispays the current values and does not allow inline editing. I managed to crash the node-red server and had to edit the flows in /root/.node-red/flows_beaglebone.json to clear the nodes from the flow before it would restart.

Despite the crashes, Node-RED looks pretty promising for the teaching applications I have in mind for hexynth and I like the way that other services and devices could be easily integrated too. If I have time, I'd like to develop some node-red node types to go alongside the hexynth JavaScript library.

  • Sign in to reply

Top Comments

  • jkridner
    jkridner over 9 years ago +1
    The latest Debian images now come with Node-RED pre-installed! Beagleboard:BeagleBoneBlack Debian - eLinux.org
Parents
  • jkridner
    jkridner over 9 years ago

    The latest Debian images now come with Node-RED pre-installed! Beagleboard:BeagleBoneBlack Debian - eLinux.org

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • jkridner
    jkridner over 9 years ago

    The latest Debian images now come with Node-RED pre-installed! Beagleboard:BeagleBoneBlack Debian - eLinux.org

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • agerber
    agerber over 9 years ago in reply to jkridner

    Excellent! It's been pre-installed in the Raspberry Pi Raspbian images since November last year so that makes sense that it would be added to the BBB images too

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