Go to Post (You know you're overdosed on FIRST) when watching regional web-casts takes precedent over Saturday morning cartoons. - Hawiian Cadder [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 01-10-2003, 09:35
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
I'm interperting your request as if you have a joystick, and you want to be able to press a button on it to slow down the robot, in order to make it more controllable.

If this is what you're looking for insert this write after the code block where you tie the p1_y and p1_x (or whatever vars you use) to the pwms:

if (p1_top = 1) then
if pwm1 > 127 then pwm1 = (pwm1-127) / 2 + 127
if pwm1 < 127 then pwm1 = (127 - (127-pwm1) / 2)
endif

Do the same for pwm2. This will reduce the speed of the robot by a factor of 2 when p1_top is pressed.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Power, speed, and torque... AGH Gui Cavalcanti Technical Discussion 5 10-11-2002 19:02
more control options smokescreen Technical Discussion 17 05-03-2002 15:41
Need help with 255 Variable Joseph F Programming 18 26-02-2002 14:49
Prgm4 2 joystics control 1 speed cntrl??? punarhero Programming 7 21-02-2002 09:57
speed control punarhero Technical Discussion 11 24-01-2002 18:03


All times are GMT -5. The time now is 02:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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