Go to Post It’s impossible to know who’s life you will change forever. Don’t miss an opportunity. I’m an optimist. Have a great season. This is the year. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2002, 15:40
chrisw chrisw is offline
Registered User
#0919
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 10
chrisw is an unknown quantity at this point
Send a message via AIM to chrisw
Question does anybody know how to program a potentimeter (<--spelling mistake)

does any body know how to program the thing that allows only 90 degree turns using PBasic?
__________________
~ chris ~
  #2   Spotlight this post!  
Unread 24-01-2002, 17:28
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Yes...

Many people know many things. We can only explain them to you if you formulate your question carefully ;-)


Seriously though, define your problem and desired result carefully and I am sure you will get a lot of help.

Joe J.
  #3   Spotlight this post!  
Unread 24-01-2002, 21:41
srawls's Avatar
srawls srawls is offline
Registered User
#0122 (Nasa Knights)
 
Join Date: Dec 2001
Location: Yorktown
Posts: 507
srawls is an unknown quantity at this point
Send a message via AIM to srawls
Yes! I know how to program potentiometers all too well We had four of them on our robot last year, with pre-defined postions involving all four of them. I had many bugs in that code ... but it sure was fun getting it to work since that was the first time I'd ever used pbasic before.

Now, to your question. Are you talking about the torque motor? I know that doesn't allow full rotation, so is that "the thing that allows only 90 degree turns." Or do you want to use a pot and limit something to only 90 degree turns? Like Mr. Johnson said, please clarify your question and we'll all be glad to help.

Stephen
  #4   Spotlight this post!  
Unread 25-01-2002, 14:34
chrisw chrisw is offline
Registered User
#0919
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 10
chrisw is an unknown quantity at this point
Send a message via AIM to chrisw
i'm trying to use a pot to limit a motor to turning only 90 drgrees. I need to know what the value that is stored in the sensor variable represents and how to prevent the motor from turning ( the motor will likely be run through a victor). also, is their a way that i can have the program slow down the motor as it approaches the end of a 90 degree turn?
__________________
~ chris ~
  #5   Spotlight this post!  
Unread 25-01-2002, 20:29
srawls's Avatar
srawls srawls is offline
Registered User
#0122 (Nasa Knights)
 
Join Date: Dec 2001
Location: Yorktown
Posts: 507
srawls is an unknown quantity at this point
Send a message via AIM to srawls
Well, just connect the pot to the motor, and the value you get is the position of the motor. Calibrate the pot however you want, but you need to find the values of the limits (the two position values that define the 90 degree turn). Then just put an abstraction in where the button (or joystick) no longer tells the motor to go a certain speed, but it tells it to go to a certain position, then have an equation to figure out how fast to move the motor taking into account the current position and the position the button (or joystick) wants the motor to move. Then all you have to do is max and min the 'position' to the limits found earlier.

I hope that made sense, if not than it's just the ramblings of a 16 year old programmer who still has flashbacks of late nights trying to fix the robot code

Stephen
Closed Thread


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
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26
Anyone looking for more program space? archiver 2001 13 24-06-2002 02:20


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

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