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
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog GPIO on BBB, Arduino and Pi
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: markvenn
  • Date Created: 27 Oct 2014 9:06 AM Date Created
  • Views 792 views
  • Likes 0 likes
  • Comments 4 comments
  • gpio
  • beaglebone_black
  • rasp-pi
  • arduino
Related
Recommended

GPIO on BBB, Arduino and Pi

markvenn
markvenn
27 Oct 2014

This is not exactly a question and it is not for a single board so bear with me. (Is that the right way to spell bear in this case? I don't want everyone thing I want them to get naked with me image)

 

Right, to the non-question; which is the most efficient way to access GPIO pins, node.js (or equivalent) or language such as Python?

 

I am working on a little / huge project, (a 3 year doctorate), and I am going to be using one or all of Arduino, Pi and BBB and I can switch on and off outputs and read inputs in node / bonescript and Python and I was wondering which is the "best" to use. The project will have a web server, most likely node, and it will need to turn stuff on and off and do you experts think that this is the best way to go about it in every case. I know the advantages of non blocking IO and asynchronicity but it got me thinking about if there were any advantages of one method over another.

 

Comments are extremely gratefully received!

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 11 years ago +1
    Hi Mark, I'm not sure Python runs on the Arduino (maybe it does), nor Node.js. The Arduino is a microcontroller, usually I/O is extremely straigntforward on these, using DigitalRead/DigitalWrite commands…
  • shabaz
    shabaz over 11 years ago in reply to pmohan

    I don't think that can strictly count, because the Python interpreter is running on the other processor on that board, which has WiFi duties (and which runs Linux so can use any language in theory).

    To control I/O, the usual Arduino language would be used, because the I/O on the board is wired to the ATmega chip. Code could be written to use the ATmega chip as a slave, so that the other processor is really in command, i.e. using the ATmega as a kind-of port expander.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pmohan
    pmohan over 11 years ago in reply to shabaz

    Arduini Yun runs Python. Doesn't that count ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • markvenn
    markvenn over 11 years ago in reply to shabaz

    You are quite right about the Arduino of course image

    In my mind I am looking at probably using the arduino to react to inputs from another platform and so I should have left that out of the discussion.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 11 years ago

    Hi Mark,

    I'm not sure Python runs on the Arduino (maybe it does), nor Node.js.

    The Arduino is a microcontroller, usually I/O is extremely straigntforward on these, using DigitalRead/DigitalWrite commands in the Arduino language (which is C I believe).

    On the RPI/BBB, you can pick your language, since these platforms run Linux. I/O has to share time with the rest of Linux, so expect some small variable latency (jitter) when issuing commands.

    The commands you issue will depend on the language you choose - some are more comfortable with C, others with Python and others with JavaScript.

    If you need to have a web server, then unless the requirement for it is quite simple, you're forced to move off the Arduino because it doesn't have much memory and other resources for handling large web pages.

    • Cancel
    • Vote Up +1 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