Go to Post Where's my hammer? I need a bigger hammer. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2011, 12:37
Team 3705's Avatar
Team 3705 Team 3705 is offline
Registered User
FRC #3705
 
Join Date: Jan 2011
Location: Canada
Posts: 34
Team 3705 is an unknown quantity at this point
Potentiometers C+

Our team is trying to find a way to measure the position of our arm using a potentiometer. We're using C++ we can't find any programs for potentiometers.
Does anyone know the best way that we could program a potentiometer in C++ to give us its position?

-Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2011, 15:28
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: Potentiometers C+

Potentiometers are an analog sensor. As such they would be plugged into the analog module on the cRIO. You should look at the analogchannel class, and the GetVoltage function within that class. You will have to multiple the voltage by some value, to get how far the pot has turned. This value can probably be found in the spec sheet for the POT.
__________________

Reply With Quote
Reply


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 14:11.

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