Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Using a limit switch (http://www.chiefdelphi.com/forums/showthread.php?t=56300)

thunderbolt 30-03-2007 11:22

Using a limit switch
 
Help!!
how do i use a limit switch to stop a motor at a given point. i need this in autonomous mode

Kingofl337 02-04-2007 19:36

Re: Using a limit switch
 
var = GetDigitalInput(1);

if ( var == 1 )
SetPWM( 1, 127); // Stop the motor


All times are GMT -5. The time now is 00:27.

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