Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Gear Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=43922)

Ryan O 13-02-2006 14:39

Gear Sensor
 
Anyoe now how to use/get the input from the gear tooth sensor? What I'm trying to do is make sure a gear doesn't drop below a certain speed. Any relavant tips would be great.

Alan Anderson 13-02-2006 14:58

Re: Gear Sensor
 
Connect its output to a digital input (any of 1 through 6) on the Robot Controller, then configure the input to cause an interrupt. Increment a counter whenever the interrupt occurs. Separately configure a repeating timer interrupt. Each time the timer goes off, save the value of the gear tooth counter and then reset it to zero for the start of the next time period.

That's the short version. If you don't understand interrupts, ask again.

winners 14-02-2006 07:05

Re: Gear Sensor
 
I dont understand the interrupts, can you please explain it to me?

Alan Anderson 14-02-2006 09:56

Re: Gear Sensor
 
See the thread at http://www.chiefdelphi.com/forums/sh...ad.php?t=43244 for information on how to count gear teeth using interrupts. Pay special attention to the post by b_mallerd.

For using timer interrupts, see the Timers White Paper: http://www.ifirobotics.com/docs/time...004-jan-14.pdf


All times are GMT -5. The time now is 01:37.

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