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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Confused about GPIO
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 676 subscribers
  • Views 773 views
  • Users 0 members are here
  • raspberry_pi
Related

Confused about GPIO

Former Member
Former Member over 10 years ago

Hi all,

 

I recently got a Raspberry pi and am loving it so far. The only problem I have encountered is GPIO. If I understand correctly, I need to download something to use them in python. I have tried everything  that i could find without success:

 

$ sudo python

>>> import RPi.GPIO as GPIO

 

(which came up with something about the file not existing)

 

and

 

$ wget http://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.1.0.tar.gz

 

(which said that the website wasn't available or something)

 

I have tried updating/upgrading the software with

 

$ sudo apt-get update


(which I think came up with some errors)


and


$ sudo apt-get upgrade


(seemed to work)


What should I do? Am I doing something wrong?  image I "inherited" the Raspberry pi, so i don't know when it was bought and it came with a preinstalled sd card so i'm not 100% sure what it is running but I think raspbian.

 

Many Thanks,

 

Kelan

 



  • Sign in to reply
  • Cancel
  • dtsartsanis
    dtsartsanis over 10 years ago

    this lesson will help u https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/overview

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 10 years ago

    Kelan,

     

    Are you still needing some help with your Pi?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • johnbeetem
    johnbeetem over 10 years ago

    There's a great deal of information about RasPi GPIOs at the RasPi Hardware Wiki: http://elinux.org/RPi_Low-level_peripherals

     

    It should be accurate for a RasPi Model A/B and has some updates for A+/B+.  I don't think it's been updated for RasPi 2 -- I think the only change from B+ is that the peripheral registers are at 0x3F000000 instead of 0x20000000.

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

    Thanks for all your comments, I tried:

    1. sudo apt-get update
    1. sudo apt-get install python-dev
    1. sudo apt-get install python-rpi.gpio

    in the LXTerminal without much success image

     

    imageimage

     

    file:///Users/solomop/Pictures/iPhoto%20Library.photolibrary/Masters/2015/03/19/20150319-210804/IMG_2961.JPG

    file:///Users/solomop/Pictures/iPhoto%20Library.photolibrary/Masters/2015/03/19/20150319-210804/IMG_2962.JPG

     

    (I'm not sure how good the pictures will turn out)

    Any other suggestions?

     

    I am thinking of getting a new SD and starting from scratch...

     

    Kelan

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

    Try this

     

    sudo apt-get -y install python-rpi.gpio

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

    You don't really need a new SD card.. You can format the one you have and start fresh.

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

    sudo apt-get update

    sudo apt-get install python-dev

    sudo apt-get install python-rpi.gpio

     

    That should install the packages for you

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