|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 ? |
|
#2
|
|||||
|
|||||
|
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(). |
|
#3
|
|||
|
|||
|
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;
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How does it work? | Ryan O | Control System | 5 | 12-03-2006 19:15 |
| Does easy c work in nt? | Bob22341 | Programming | 2 | 12-01-2006 22:11 |
| How slow is too slow? | Joe Ross | Rules/Strategy | 23 | 12-10-2004 20:23 |
| How do light sensor(Banner) work? | roberthan | Programming | 9 | 25-02-2004 14:05 |
| sensor doesn't work | PBoss | Programming | 7 | 29-01-2003 18:39 |