User Tools

Site Tools


tutorials:learn:sensors:ir.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorials:learn:sensors:ir.html [2012/06/08 16:04]
dylan45pie
tutorials:learn:sensors:ir.html [2012/06/08 16:05]
dylan45pie
Line 150: Line 150:
 {{  http://​www.ladyada.net/​images/​sensors/​arduinopna4602.gif?​nolink&​618x416 ​ |}} {{  http://​www.ladyada.net/​images/​sensors/​arduinopna4602.gif?​nolink&​618x416 ​ |}}
  
-The good news is that it is very easy to hook up this sensor. ​ Just connect the output to a digital pin. The bad news is that the Arduino'​s friendly **digitalRead()** procedure is a tad too slow to reliably read the fast signal as its coming in. Thus we use the hardware pin reading function directly from pin D2, thats what the line IRpin_PIN & (1 << ​IRpin)does. ​+The good news is that it is very easy to hook up this sensor. ​ Just connect the output to a digital pin. The bad news is that the Arduino'​s friendly **digitalRead()** procedure is a tad too slow to reliably read the fast signal as its coming in. Thus we use the hardware pin reading function directly from pin D2, thats what the line "IRpin_PIN & BV(IRpin))" ​does. 
  
 [[http://​github.com/​adafruit/​Raw-IR-decoder-for-Arduino|You can also get the latest version of this code on github]]<​code C> [[http://​github.com/​adafruit/​Raw-IR-decoder-for-Arduino|You can also get the latest version of this code on github]]<​code C>
/home/ladyada/public_html/wiki/data/pages/tutorials/learn/sensors/ir.html.txt · Last modified: 2016/01/28 18:05 (external edit)