Go to Post Doughnuts would probably be a pretty good alternative to churros. However, that could be open to debate. - Calvin Hartley [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 07-02-2006, 16:51
Unholy Unholy is offline
electrical / makeshift programmer
AKA: Daniel
FRC #1402
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2002
Location: Orlando, FL
Posts: 21
Unholy is an unknown quantity at this point
Send a message via AIM to Unholy
Potentiometer help

Greetings everybody,
I'm Dan from 1402, and I have sort of an issue in my hands among with my programming group. To begin with, we're not very C-savvy, so just bear with us. We want to include a potentiometer in our program, but we're not exactly sure how to go about it. Last year, I was thrown into programming during the season, so I never really quite got the potentiometer part. We are not exactly sure where to add the basic potentiometer data (definition, etc). Also, we plan to have set values, so we are wondering where could we define such values. We appreciate any help we can get.
Thanks in advance,
-Dan, Yuriy, and Chris
  #2   Spotlight this post!  
Unread 07-02-2006, 17:00
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Potentiometer help

Quote:
Originally Posted by Unholy
Greetings everybody,
I'm Dan from 1402, and I have sort of an issue in my hands among with my programming group. To begin with, we're not very C-savvy, so just bear with us. We want to include a potentiometer in our program, but we're not exactly sure how to go about it. Last year, I was thrown into programming during the season, so I never really quite got the potentiometer part. We are not exactly sure where to add the basic potentiometer data (definition, etc). Also, we plan to have set values, so we are wondering where could we define such values. We appreciate any help we can get.
Thanks in advance,
-Dan, Yuriy, and Chris
Pots are easy. Check out the FIRST Guidelines, Tips, and Good Practices document. But basically, the pot gives a 0-5 V signal, which is read by the RC using Get_Analog_Value() (unless you're using Kevin Watson's ADC.c/h), yielding a 10 bit value (0-1023).
  #3   Spotlight this post!  
Unread 07-02-2006, 17:34
Unholy Unholy is offline
electrical / makeshift programmer
AKA: Daniel
FRC #1402
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2002
Location: Orlando, FL
Posts: 21
Unholy is an unknown quantity at this point
Send a message via AIM to Unholy
Re: Potentiometer help

Quote:
Originally Posted by kaszeta
Pots are easy. Check out the FIRST Guidelines, Tips, and Good Practices document. But basically, the pot gives a 0-5 V signal, which is read by the RC using Get_Analog_Value() (unless you're using Kevin Watson's ADC.c/h), yielding a 10 bit value (0-1023).

So, would it be ok to put that command under UserRoutines.c, or where would you suggest to put that command?
  #4   Spotlight this post!  
Unread 07-02-2006, 17:40
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Potentiometer help

Quote:
Originally Posted by Unholy
So, would it be ok to put that command under UserRoutines.c, or where would you suggest to put that command?
Wherever you're trying to use the value (user_routines.c is the most obvious place). What are you trying to do with the pot?
  #5   Spotlight this post!  
Unread 07-02-2006, 17:48
Unholy Unholy is offline
electrical / makeshift programmer
AKA: Daniel
FRC #1402
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2002
Location: Orlando, FL
Posts: 21
Unholy is an unknown quantity at this point
Send a message via AIM to Unholy
Re: Potentiometer help

Quote:
Originally Posted by kaszeta
Wherever you're trying to use the value (user_routines.c is the most obvious place). What are you trying to do with the pot?
We're trying to have set values to fire at a given angle. We're using the pot to give us reference. Also, we are planning to use it during autonomous mode. Personally, I am a bit confused since last year I had a robot.c/.h divison. By the way, thanks for the help ^_^
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
coding a potentiometer incognito_NICK Programming 5 14-02-2005 15:56
Potentiometer Trouble ?? VideoMan053 Programming 18 28-01-2005 14:10
Potentiometer Joshua May Technical Discussion 8 22-05-2004 19:51
Potentiometer with BS2 sanddrag Programming 7 13-05-2004 19:21
Potentiometer Problem Greg General Forum 1 15-02-2003 18:10


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

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