Go to Post I used to wonder if the FRC staff would read the CD game hint posts and just laugh to themselves..now I know they do. - rachelholladay [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
  #1   Spotlight this post!  
Unread 17-02-2010, 20:29
lsprague lsprague is offline
Registered User
FRC #3256 (WarriorBorgs)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: San Jose, CA
Posts: 1
lsprague is an unknown quantity at this point
Programming Pots

We planned to set up joystick buttons to make the kicker move to a set position using potentiometers, but it keeps overshooting and getting stuck. Here's what we have:

Code:
if(rightstick->GetRawButton(HIGH_POT_BTN))
{
while(kickerValue != HIGH_POT)
{
GetWatchdog().Feed();
if(kickerValue>HIGH_POT)
winch->Set(Relay::kForward);
else 
winch->Set(Relay::kReverse);
}
else
winch->Set(Relay::kOff);
}
We tried using if instead of while because of watchdog problems, but that would only work by holding the button down. Now, the kicker pulls back too far and gets stuck. Does anyone know if it's a problem in the code or in the numbers we used for the pots?
 


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
small joystick pots?? Bruceb Control System 1 18-02-2008 11:59
10 turn 100k pots rust710 Electrical 5 02-04-2003 15:10
Limit Switches/Pots Brett W Technical Discussion 3 28-01-2003 14:25
THIS IS AN OT POTS!!!!!1!!!! (EOM) archiver 2001 0 24-06-2002 03:17
3-turn pots archiver 2001 2 24-06-2002 01:24


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

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