Menu

#141 RPi.GPIO.PWM + python multiprocessing.process

New
nobody
None
Critical
Patch
2016-10-17
2016-10-17
No

I'd like to use multiprocessing.process with RPi.GPIO (PWM) and Tornado web server to control some motors via a web server. When I run my PWM routine "normally" (either as main, or imported and called in some other module), it works fine. However, when I attempt to run it as process, it fails (although the rest of the routine outputs correct debug information, so I know the routine is running.

~~~
if name == 'main':

this works as expected!

startPWMtest()

this doesn't work!

a = multiprocessing.Process(target=startPWMtest)
a.start()
print "Started startPWMtest..."
~~~`

Debug messages for both are identical, which makes me wonder if there's some sort of process permission? Main script is being executed via standard sudo python name.py

Any thoughts would sure be appreciated as I feel like I've been stumbling around this one for a bit!

Thanks,
Jim

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.