swt4583
Posts: 2
Joined: Fri Mar 18, 2016 7:17 pm

Threading for GPIO

Mon May 16, 2016 1:27 pm

Hey all,

I do not know much about threading in python but I thought since my project requires specific timing I figured I would try it out but I figured that I would ask first. I am trying to communicate to a One-Wire EEPROM using strickly GPIO pins since I have tried using the i2c bridge and it did not work. Also, I need my USB ports for other hardware. The problem is, is that python will execute each line approximately 50-100us and one wire requires communication down to the 1-10 us level so I was curious that if I try threading that I can execute the GPIO pins at this timing. Would this work? I am running Raspbian Wheezy. Thanks for your help :D

User avatar
KnightOfPi
Posts: 50
Joined: Sun Dec 28, 2014 12:57 pm
Location: Vienna - Austria
Contact: Website

Re: Threading for GPIO

Tue May 17, 2016 5:19 am

Hi,

i made similar experiments and it worked quite good, but i used https://docs.python.org/2/library/multiprocessing.html
instead of threading which really runs on different processors...
Check out www.knight-of-pi.org for many beginner-friendly tutorials!

Return to “Python”