Tuesday, 3 February 2015

RPi-GPIO and the Raspberry Pi 2

So the New Raspberry Pi 2 Model B was released this week. I managed to get hold of one on the Monday and then spent the whole evening playing around with it. 

It is true that the pinouts are identical  to the Model B+ and A+ but this doesn't mean that in these first few day of release getting the GPIO running is plane sailing.

My first port of call was Python and RPi.GPIO so opened Python tapped in 
import RPi.GPIO as GPIO

and was greeted with this message.



This could pose a problem. Thinking that a small update is probably required I decided that an 
apt-get update 
sudo apt-get install python-rpi.gpio 
was in order to make sure I was up with the latest version.   


MMMMMMMMMMMm.

Here's The Solution 

Download the new version from Source Forge with:

wget http://sourceforge.net/projects/raspberry-gpio-python/files/raspbian-wheezy/python-rpi.gpio_0.5.9-1_armhf.deb
and install it using:
sudo dpkg -i python-rpi.gpio_0.5.9-1_armhf.deb

This should bring you joy.


Hope this helps anyone wanting to get the GPIO running.


 

 




3 comments:

  1. Hi, Thank you so much for fixing this !!!! However I still have trouble driving LCD HD44780. It works fine with previous versions of rpi but no activity on new rpi2. Kindly let me know what needs to be done inorder to fix.

    ReplyDelete
  2. I'l will have a look. I just happen to have a project that uses a 16 x 2 character display on the go at the moment :). Glad to hear that people are finding it useful.
    Happy Hacking

    ReplyDelete