I have taken the liberty of creating a Python module for GPIO on R-Pi. The project pages are at:
http://code.google.com/p/raspb.....io-python/
The module is also available on PyPi:
http://pypi.python.org/pypi/RPi.GPIO/
It is open-source under a MIT licence.
Warning: It is still pre-alpha so I might change it completely yet. I've not been able to test because I'm waiting for a R-Pi like the rest of you!
Re: Python GPIO module
Very useful !
Thank you
Thank you
Re: Python GPIO module
Excellent!
Will follow this with interest. Thinking a software virtual GPIO emulation would be useful for experimenting with, is that possible?
Will follow this with interest. Thinking a software virtual GPIO emulation would be useful for experimenting with, is that possible?
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.
My new book: goo.gl/dmVtsc
Meltwater's Pi Hardware - pihardware.com
Like the MagPi? @TheMagP1 @TheMagPiTeam
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.
My new book: goo.gl/dmVtsc
Meltwater's Pi Hardware - pihardware.com
Like the MagPi? @TheMagP1 @TheMagPiTeam
Re: Python GPIO module
Bump for those interested, and may of finally had their Pi delivered.
Texy
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
Re: Python GPIO module
I have a RPi and am testing the module at the moment. I have already had to change something so there will be a new version later today.
-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Python GPIO module
Have you updated the module yet? Very interested.
Re: Python GPIO module
Very nice wrapper! I skim-read your source and it looks very well done, and leads to really readable user code.
Great stuff! Consider yourself @followed.
Great stuff! Consider yourself @followed.
Re: Python GPIO module
The Python GPIO module has now been tested and released!
-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Python GPIO module
What is the 'RPi.GPIO as GPIO' refering too? Where is this module?
-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Python GPIO module
Whoa just playing with the GPIO's when i just caused the raspi to restart... Thank god no perminant harm done.
Re: Python GPIO module
croston said:
The Python GPIO module has now been tested and released!
Do your Python module support the hardware GPIO intterrupts (rising edge, falling edge, positive,negative,change)?
The interesting thing about hardware GPIO interrupt support is that polling can be avoided and you application can sleep.
The program will then be avaken by the kernel if you are using asynchronous (async) I/O:
http://www.ibm.com/developerwo.....y/l-async/ (look at figure 5)
The Python GPIO module has now been tested and released!
Do your Python module support the hardware GPIO intterrupts (rising edge, falling edge, positive,negative,change)?
The interesting thing about hardware GPIO interrupt support is that polling can be avoided and you application can sleep.
The program will then be avaken by the kernel if you are using asynchronous (async) I/O:
http://www.ibm.com/developerwo.....y/l-async/ (look at figure 5)
-
- Posts: 21
- Joined: Wed Apr 18, 2012 6:25 pm
Re: Python GPIO module
Idk man but it works pretty well. I got my light blinking (its red... ).
You can download it here, if you want to take a look at.
http://pypi.python.org/pypi/RPi.GPIO
You can download it here, if you want to take a look at.
http://pypi.python.org/pypi/RPi.GPIO
-
- Posts: 6
- Joined: Mon Apr 23, 2012 12:59 pm
Re: Python GPIO module
I have created a PKGBUILD for Arch Linux. If someone can test it, that would be great.
https://aur.archlinux.org/packages.php?ID=59458
Any suggestion is welcome. Regards!
https://aur.archlinux.org/packages.php?ID=59458
Any suggestion is welcome. Regards!
Re: Python GPIO module
hi - downloaded the module and gave it a go. Worked just fine and I've got my daughter's 'Hot Wires' electronics lab now hooked up to the Raspberry. Given I'm new to linux, Python and very rusty on electronics I'm feeling very chuffed 

Re: Python GPIO module
Hi,
new to python and linux and struggling to get a LED to light up in python with this script. i can do it in the shell using the wiki guide, but in python.
I,ve posted this in the python thread :
http://www.raspberrypi.org/phpBB3/viewt ... =32&t=7370
Can anyone help with what I'm doing wrong?
Thanks,
Texy
new to python and linux and struggling to get a LED to light up in python with this script. i can do it in the shell using the wiki guide, but in python.
I,ve posted this in the python thread :
http://www.raspberrypi.org/phpBB3/viewt ... =32&t=7370
Can anyone help with what I'm doing wrong?
Thanks,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555