Re: multiple LIRC ?
Ivan Sergio Borgonovo <[email protected]>
| Newsgroups | gmane.org.user-groups.linux.svlug |
|---|---|
| Organization | http://www.WebThatWorks.it |
| Message-ID | <[email protected]> |
On 10/15/2016 09:54 PM, Bob Smith wrote: > I'm trying to build a robot that does not > have an MCU or FPGA for the real-time > stuff. So far so good: the periodic > timer triggers within +/- 4 microseconds > of when expected. > The next problem is to accurately time > a set of incoming pulse streams. One > is for an IR receiver and it occurred > to me that LIRC mode2 is exactly right > for all the pulse streams. Unfortunately > you can not load LIRC multiple times. I > was able to create multiple instances of > the LIRC driver but could not open more > than one at a time due to an IRQ conflict. > Any suggestion on how to use interrupts > on GPIO pins to accurately measure pulse > widths? > The platform is a RPi3 with a 4.4.7 kernel. Let me summarize to see if I got it right: So you have an IR interface and you can use LIRC then you would like to measuere intervals on a simple GPIO. Try to give a look here: https://sourceforge.net/p/raspberry-gpio-python/wiki/Inputs/ Once you can use interrupts for edge detection it all depends on the level of accuracy you need. Of course if you can do it in python, you'd be able to use C once you find the C doc, but at least you know it is feasible and what to look for. -- Ivan Sergio Borgonovo http://www.webthatworks.it http://www.borgonovo.net