[PD] External with separate thread. Do I need to lock?

Rafael Vega email.rafa at gmail.com
Thu May 22 14:04:30 CEST 2014


Hi Simon,
I'm using an interrupt interface for reading the digital inputs but polling
for reading the analog ones. Probably not the best thing to do as you say.
I'd be hapy to look at the references you mention.
Thanks!



On Thu, May 22, 2014 at 1:44 AM, Simon Wise <simonzwise at gmail.com> wrote:

> On 22/05/14 02:01, Rafael Vega wrote:
>
>> Hi.
>>
>> I'm developing an external that starts a separate pthread to poll some
>> hardware inputs. When the outputs change, I need to send a message like
>> [34
>> 56( to one of two outlets in the external from my thread.
>>
>
> from your previous emails I'd guess you are using a beagle board, I'm not
> sure what they provide as far as hardware interface goes, but on the
> Raspberries there is a library, and several usable APIs, that give access
> to the hardware interrupts from the GPIOs, either in many languages
> including C, python, bash etc so no need for polling, you can just use a
> call-back in C or even simpler start a call-back program in bash and pipe
> its (filtered) output to pd via pdsend.
>
> I can send some useful references to the Pi stuff if you are interested.
>
> It really is much better to avoid having polling loops and such in the
> CPU, hardware does this much better ... the GPIO drivers in the Pis offer
> callbacks, DMA and such to avoid this ... probably something similar is
> available on the beagleboard, otherwise that's the advantage of using
> something like an arduino ... the polling is then done in the arduino and
> only the relevant details are passed on to the main computer.
>
> A big operating system really isn't the right environment for the kind of
> timing required for low-level hardware interfaces.
>
>
> Simon
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
> listinfo/pd-list
>



-- 
Rafael Vega
email.rafa at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140522/94f0a2c8/attachment.html>


More information about the Pd-list mailing list