View Single Post
  #2   Spotlight this post!  
Unread 12-02-2005, 15:35
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 774
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav
Re: coding a potentiometer

Quote:
Originally Posted by incognito_NICK
I am trying to look at the values i get with a potentiometer through the dashboard, but my attempts are ending in failure.
So is there some special code that have to put in so that i can read it or is it because i have it plugged in the wrong spot.
anyone know the solution?

on your pot you should have 3 pins, i blieve that the two outer ones should be connected to the + and - pins of the analog inputs and the middle one to the signal pin. (not infront of the robot right now...)

once you do that use this code: (assuming you connected it to analog input #1)
Code:
pot1=Get_Analog_Value(rc_ana_in01);
printf("pot1=%d \r ",pot1);
i'm not sure if you can read the analog inputs with the dashboard....
-Leav
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)