Go to Post Just the fact we were selected to compete in the eliminations energized the kids more than anything I had seen - Taylor [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2012, 16:07
hsekhon27 hsekhon27 is offline
Registered User
FRC #0280 (TNT)
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2011
Location: Taylor, MI
Posts: 23
hsekhon27 is an unknown quantity at this point
Resetting a potentiometer

I have programmed a potentiometer to give me the heighest number of degrees it turned. But I want to reset it to a default value using a limit switch. any ideas on how to do that?
  #2   Spotlight this post!  
Unread 17-02-2012, 16:26
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,171
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Resetting a potentiometer

Quote:
Originally Posted by hsekhon27 View Post
I have programmed a potentiometer to give me the highest number of degrees it turned. But I want to reset it to a default value using a limit switch. any ideas on how to do that?
You can't physically reset the pot in software but you can use the limit switch to learn a "home" position and thereafter subtract home from the current reading to derive an absolute position.

If the pot will rollover (from max R to 0 and back) things get a little tricker. You'l have to maintain your own "index", index = how many times pot has rolled over and increment/decrement the index as the pots rolls forward or backwards though its zero point.

HTH
__________________
Fast, cheap or working - pick any two!
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


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

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