PICAXE questions

Dec 07, 2004 1 Replies

Hi, I have 2 questions about PICAXE:


1) my program run executing a loop that do some operations; at the same time I would like to detect data from infrared sensor by INFRAIN command. I thought to do this: program run into main loop (not stand by on IFRAIN) and interrupt is set to pin 0 high (pin enabled to receive data from infrared sensor). When program detect high level on pin 0 (begin trasmission) execute interrupt sobroutine (interrupt detected); here, INFRAIN command decode data received. Otherwise I could detect interrupt on other pin, connected, anyway, to infrared sensor. Do you think it will work?
2) I have to detect if button on IR remote control is held. After each operation following valid data on infrared pin, before execute next INFRAIN command, I call a subroutine like this: check pin 0 (infrared) for high level continuosly (approx. 45 ms). If high level is detected then button is held. Now execute INFRAIN command again. Do you think it will work?

Thank you



You'll probably get a good response to your question at the manufacturer-sponsored PICAXE forum:

formatting link

and also, reread the software manual.

Good luck Chris

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required