few suggestions :
- make frequency default to 50Hz (usual PWM frequency)
- give ability to set pulse up duration in µs
- give servo angle setter function : pulse in µs = 1520 + angle*400/45
this is the futaba and most used standard : 1520µs neutral, 400µs/45° travel
there is also 1500 + angle*500/45 but it's not correct for most servos.
Aptitude says I have the latest version of RPi.GPIO v.0.5.2.a-1 installed, but I get an error trying to use GPIO.PWM() or GPIO.cleanup(). I tried to print GPIO.VERSION but got the same not present error. It is like none of those functions/methods are there. Any help to know what to try next?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I learned my own answer - but I'll post here what helped in case it can help someone else.
Even tho Aptitude said I had the latest version of python-rpi.gpio, when I ran:
[pip freeze] it showed me the version was only 0.3 something.
so then I was able to run the following to upgrade to the latest:
[sudo pip install RPi.GPIO --upgrade]
now the newer functions work! :-) Thanks for your work on this module!
Last edit: Anonymous 2016-12-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: btcros...@googlemail.com
Software PWM will be available in 0.5.2a
Status: Started
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: btcros...@googlemail.com
Experimental software PWM now released in 0.5.2a
For documentation, see http://code.google.com/p/raspberry-gpio-python/wiki/PWM
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: eric.p...@gmail.com
few suggestions :
- make frequency default to 50Hz (usual PWM frequency)
- give ability to set pulse up duration in µs
- give servo angle setter function : pulse in µs = 1520 + angle*400/45
this is the futaba and most used standard : 1520µs neutral, 400µs/45° travel
there is also 1500 + angle*500/45 but it's not correct for most servos.
you should also take a look on RPIO.PWM (http://www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=36670)
it uses DMA instead of thread, for a really better result, avoid flickering or need to increase thread priority.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bruce...@gmail.com
Aptitude says I have the latest version of RPi.GPIO v.0.5.2.a-1 installed, but I get an error trying to use GPIO.PWM() or GPIO.cleanup(). I tried to print GPIO.VERSION but got the same not present error. It is like none of those functions/methods are there. Any help to know what to try next?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bruce...@gmail.com
I learned my own answer - but I'll post here what helped in case it can help someone else.
Even tho Aptitude said I had the latest version of python-rpi.gpio, when I ran:
[pip freeze] it showed me the version was only 0.3 something.
so then I was able to run the following to upgrade to the latest:
[sudo pip install RPi.GPIO --upgrade]
now the newer functions work! :-) Thanks for your work on this module!
Last edit: Anonymous 2016-12-20
Should this ticket have been closed by now? ;-)
https://sourceforge.net/p/raspberry-gpio-python/wiki/PWM/