Would someone please help me a bit by steering me in the correct = direction here? I've read everything I could find in books and on the = net about this subject, but I'm still very stupid when it comes to the = electronic bits. Please forgive my ignorance, but I'm really trying. I want to add distance measuring to my robot. I connected an IR = detector (TSOP) to a breadboard and then connected it to a PIC chip on a = development board. Using MPLAB and ICD2 and the development board, I = wrote some code to detect when the IR detector detects something. I put = the debugger into a loop to stop when the IR detector receives something = and it worked great. So far so good, I thought. To test things, I used our TV remote control. Every time I pushed a = button the debugger stopped at a break point. Perfect! Yes? No! No matter where I pointed the thing, the IR detector detected it. = I even put aluminum foil around the IR detector, and still it wouldn't = fail. It is just a Gr=FCndig TV and remote. What am I doing or thinking wrong? =20 I tried to move from IR to sonar, but I cannot understand how the = electronic portion works for the receiver. (I've ordered "The art of..." = and "Beboop.."; they are on their way.) Thanks very much to the people who take the time to help me. Cheers, Lindy --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 =20 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics