Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   IR Sensor: Does Slow Loop Polling Work. (http://www.chiefdelphi.com/forums/showthread.php?t=63480)

de_ 07-02-2008 14:31

IR Sensor: Does Slow Loop Polling Work.
 
The IR specs say the IR sensor outputs 100MS pulses. The RC slow loop is ~26ms (unless your code takes longer than 26ms!) which means you should easily be able to catch IR sensor outputs without interrupts. Our quick test a few weeks ago did not catch IR outputs though maybe we did something wrong.

Anyone successfully using standard slow loop polling (ie NOT non-interrupt driven, NOT high speed CPU timer based polling) successfully with the IR Sensor ?

If doesn't work, do we know why not ? Has anyone actually measured the pulse width ?

Mark McLeod 07-02-2008 14:50

Re: IR Sensor: Does Slow Loop Polling Work.
 
I've done it without problems. You get 3 to 4 hits.
I've got some FRC example code here that does everything in Default_Routine().

JonathanLKS 07-02-2008 23:49

Re: IR Sensor: Does Slow Loop Polling Work.
 
I've also gotten the IR sensor to work fine in the slow loop. All I did was just a simple if statement like this
Code:

if(rc_dig_in01 == 1)
{
button_pressed = 1;
}



All times are GMT -5. The time now is 23:46.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi