[TriEmbed] IR sensor vs trigger

Jeff Highsmith jeff at jeffhighsmith.com
Sat Jul 26 15:34:34 CDT 2014


Joe,

My thinking is to use the interrupt for the trigger, as that is simpler, and you may want to be able to use coded pulses ("who shot me?") in the future, which I think would be easier to do in the main loop. Since interrupts should be off while handling an interrupt, whatever you do in the handling needs to be quick and done before the next interrupt comes along. 

Others, feel free to correct me, as my enthusiasm sometimes surpasses my knowledge. 

Jeff :)


> On Jul 26, 2014, at 16:09, Joe Fair <joe at fairanswers.com> wrote:
> 
> Ok.  I'm pretty close on getting my home made laser tag with at tiny 85s going, but now i have a question about design.
> 
> The loop I'm using detects a trigger pull, then a hit on the sensors.  however, The pulse in function I'm using to sense IR ha a timeout of 1 second.  If there is no inbound signal it is only checking got a trigger pull once a second.
> 
> So i need to use an interrupt, but does it matter if i use one on the trigger pull or the ir sensor?
> 
> Joe
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20140726/1ad1b884/attachment.htm>


More information about the TriEmbed mailing list