Let's Make Robots!

Help need with IR detection and irin


New to this malarkey so please excuse the ingorance.


I built the "Start Here" robot by fritsl. Works fine no problems - great introduction. Moved on to a BEAM mini sumo from Junkbots and got someone at work to explaine why it worked...

So, I have tried to expand and experiment with the pic based bot. I have added LEDs and light sensitive direction. Works OK

My problem is with the IR detection using a PNA4602 and irin.

I replaced the sharp GP2D12 with the PNA4602. From the left with the bubble facing;

   Pin1=output (middle pin)

Pin2=black (pin furthest from the edge of the board) and

Pin3=red (pin closest to the edge of the board) 

I started using readadc 0, b1 - that was what is in the code for the sharp. This sort of worked, with b1 changing from 255 to 3 as I pressed lots of remotes, always 3. I then read about irin and thats where I got bogged down. No matter what flavor of irin I used the program just hung on the irin line. It refused to either timeout of accept that an IR signal had been received. Going back to readadc, proved that the IR receiver was still working.

eg code


irin [500 , main], 0, b1    or     irin 0, b1


Im using PICAXE-28X1 (40X1) Firmware version 6

Have I plugged the PNA4602 into the correct place, looks ok because readadc at least reads in a value ?

Whats wrong with irin, it will not timeout or read anything in?




Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I have the same problem, and can not progress further even after trying your code_ing  idea:-

My 28X1 also just hangs with the "irin" without timing out ......nada (i have also tried all variants of the irin command).

I thought I was the only one who said "malarky." Then again, I thought I was one of the last to habitually use the words "epic" and "awesome" till I came here too.

Do you have the associated resistors/capacitors for the IR Rx circuit?