jensmith25
Senior Member
Hi all,
I have set up an infra red sensor (LED020) with a 14M2 chip on the 14M project board AXE117.
For info I'm running 5 LEDs off 2 pins through the darlington driver so one set lights up on button 1 of the remote and the other set lights up on button 2 of the remote. Buttons 6 and 7 turn them off. Simple programme to test it's working basically. I've cheked the LEDs light by running a basic high B.1 etc test programme and they work fine so it's definately the sensor.
I can't get the IR sensor to work. I've triple checked my wiring and I had a search on the forum and one suggestion to check the IR sensor was recieving was to put an LED between V+ and the picaxe pin and if the LED flashes on pressing the relevant buttons on the remote then it's working.
My LED is flashing.
So I'm now wondering if I've put the sensor on the wrong pin of the 14M2..... I've put it on pin C.4... is this correct??
I couldn't see any reference to irin on the 14M2 pin out diagram so I assumed any pin would be ok but as it's not working...
Hope someone can help with this as I've spent hours trying to get it to work!
This is my code just in case there's something wrong there but I think it's ok as I've used a similar programme previously, just the input pin that's diffierent:
I have set up an infra red sensor (LED020) with a 14M2 chip on the 14M project board AXE117.
For info I'm running 5 LEDs off 2 pins through the darlington driver so one set lights up on button 1 of the remote and the other set lights up on button 2 of the remote. Buttons 6 and 7 turn them off. Simple programme to test it's working basically. I've cheked the LEDs light by running a basic high B.1 etc test programme and they work fine so it's definately the sensor.
I can't get the IR sensor to work. I've triple checked my wiring and I had a search on the forum and one suggestion to check the IR sensor was recieving was to put an LED between V+ and the picaxe pin and if the LED flashes on pressing the relevant buttons on the remote then it's working.
My LED is flashing.
So I'm now wondering if I've put the sensor on the wrong pin of the 14M2..... I've put it on pin C.4... is this correct??
I couldn't see any reference to irin on the 14M2 pin out diagram so I assumed any pin would be ok but as it's not working...
Hope someone can help with this as I've spent hours trying to get it to work!
This is my code just in case there's something wrong there but I think it's ok as I've used a similar programme previously, just the input pin that's diffierent:
Code:
#Picaxe 14M2
main:
irin [1000,main],C.4,b0 ;wait for new signal
if b0 = 0 then swon1 ;switch on 1
if b0 = 1 then swon2 ;switch on 2
if b0 = 6 then swoff1 ;switch off 1
if b0 = 7 then swoff2 ;switch off 2
goto main
swon1:
high B.1
goto main
swoff1:
low B.1
goto main
swon2:
high B.2
goto main
swoff2:
low B.2
goto main