Today I was busy trying to interface an infrared detector to a PICAXE 28X1 on a project board. My goal is to integrate this into my first robot, Ajax, so he can receive commands from an TV remote control.
The PICAXE documentation shows the 3 pins on the dectector wired to a a couple of resistors and a single capacitor, how hard could it be?
Two hours, later I am getting nothing on input pin0 at all. Zero, Zilch, Nada. Nothing.
The irin command never seems to return even though I give it a timeout value and a label to goto on an error.
After a while I realized that the IRIN command was ...never coming back... which seemed very odd.
Doing a bit of googling I found an article saying it could be caused by a noisy signal. At that point I disconnected my IR sensor entirely and just tried to apply 5 volts to the input pin. Concerned about shorting my board/chip I pushed this through the 4k7 resistor I had been using and got ...nothing.
It was bad enough I couldn't get the IR detector working but now it looked like I couldn't even read a button press on an input pin???
I finally used a short block to short the pin to 5 volts and SURPRISE it worked fine.
I was confused and then looked more closely at my resistor. It turns out I was using a 47,000 ohm resistor not a 4,700 ohm resistor.
It appears that "numbers count" ...LOL.
The battle resumes tomorrow, one mistake down, more to go....LOL.