Help need with IR detection and irin
January 21, 2011
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.
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?