View Single Post
  #3   Spotlight this post!  
Unread 03-02-2016, 15:02
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,564
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Reading the angle of a shooter

A potentiometer is a variable resistor controlled usually by rotating a shaft. You've seen them, I'm sure - old style volume control knobs are potentiometers. You can get them at radio shack or just about any on-line electronics parts store. Go for a linear taper potentiometer (not logarithmic, which are meant for audio controls) with a top end resistance of 10k to 100k ohms. Much lower resistance will draw more current than needed, and too high will begin to lose some of the range to the internal resistance of the analog I/O port. Most potentiometers with less than a one-turn range have the brush (moving piece) on the central terminal. From an analog I/O port, wire ground to one end terminal, 5V to the other end terminal, and the input to the brush.

Here's an example for less than a dollar (before shipping).
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 03-02-2016 at 15:05.
Reply With Quote