IR sensors

03 Jul 2011

How do I wire up and use an IR sensor? It has three pins and I'm confused.

03 Jul 2011

power,gnd,signal.

maybe you can give us a type number or picture. There are more than 1 sensor in this world :)

03 Jul 2011

http://www.antratek.de/images/Ir-Rx+Tx-groot.jpg

The thing on the left.

So, I just pop one into, like, pin21, the middle in ground and the other in pin 22 and use p22 as analog in?

03 Jul 2011

I think I wired it up alright... what about code?

04 Jul 2011

I think you must connect to digital in , this is not a analog signal. Have you looked in the http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/IRdecodeDetectAppnote.zip There are some examples in picbasic. Look at page 1.2 from the stamp weekend application ( inside the zip file): P7 should be PWMOUT (e.g P21 mbed), P8 should DigitalIN (e.g p20 mbed ) I think when you read the example program you have an good start how to use the sensor. I am not so familiair in programming this kind of problems, and have no such sensor to play with it.

04 Jul 2011

There is an excellent example here , by Shinichiro Nakamura

no need to reinvent the wheel !

http://mbed.org/cookbook/IR and http://mbed.org/users/shintamainjp/notebook/remote_ir_en