Ask Your Question
0

Installing Python with Ubuntu and raspberry Pi

asked 2016-01-09 01:28:25 -0500

swilker gravatar image

Can some one help me find the correct instructions for installing python with GPIO on my Pi. I'm running ubuntu and I just finally got ROS to install and really don't want to screw it up.... Right now if I run a python script GPIO does not work.

edit retag flag offensive close merge delete

Comments

What have you installed so far. What version of ubuntu are you using. You say it doesn't work, can you provide an example of what you do and what happens - do you get errors - if you do please post them

nickw gravatar image nickw  ( 2016-01-09 04:43:18 -0500 )edit

How do you talk to the Pins? I'd bet on missing privileges. I'm using the wiringPi library that provides ways to access to Pins also as normal user.

NEngelhard gravatar image NEngelhard  ( 2016-01-09 08:26:12 -0500 )edit

I've installed a button on the Pi-2. Example at: http://iot-projects.com/index.php?id=... , worked fine on my Raspbian copy. When I run it on my Ubuntu Ros version I get Import Error no Module named RPi.GPIO the basic python commands work... I believe I have Ubuntu 13.10

swilker gravatar image swilker  ( 2016-01-09 19:55:37 -0500 )edit
swilker gravatar image swilker  ( 2016-01-09 22:22:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-10 02:42:19 -0500

updated 2016-01-10 02:59:10 -0500

It works on raspbian because that has raspberry pi specific things like RPI.GPIO already installed. You will need to install that yourself on a more generic ubuntu system.

This is something that I think you will get more help from asking on the raspberry pi forums as it is a raspberry pi issue, not a ROS one. For RPI.GPIO you need device tree support enabled in ubuntu, I don't know whether it is in 13.10 - there is a post here about getting it working with ubuntu 14.04 that might help https://www.raspberrypi.org/forums/vi... http://askubuntu.com/questions/621134...

All the examples I have seen use 14.04 and upwards, and ROS support is better on 14.04. Is there a reason for using 13.10 (if that is what you have) ?

version 15.10 here https://ubuntu-mate.org/raspberry-pi/ comes with RPI.GPIO pre-installed

edit flag offensive delete link more

Comments

I was getting mixed up - you need device tree support for the newer underlying mechanism that means you can use gpio with being root.

nickw gravatar image nickw  ( 2016-01-10 13:58:14 -0500 )edit

Ok Yes spent the 2 hours plus redoing everything in Ubuntu 14.04, that's not the solution. 15.10 is made for Intel x86 and AMD64 the Pi is CPU: 900 MHz quad-core ARM Cortex A7 not sure they are compatible. I'm thinking there is no solution. Perhaps Raspbian with ROS... shoot!

swilker gravatar image swilker  ( 2016-01-10 17:31:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-09 01:28:25 -0500

Seen: 446 times

Last updated: Jan 10 '16