View Single Post
  #24   Spotlight this post!  
Unread 09-06-2015, 18:00
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,634
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: Arduino Micro with Talon SR

Quote:
Originally Posted by AdamHeard View Post
Why do this versus explicitly writing the 1000 to 2000 range?
If you were using something other than a Talon, you would only have to change the initial attach call; the rest of the code wouldn't need to be modified. For example, a jaguar would be attached with:
Code:
driveServo.attach(3, 670, 2330); // Jaguar
Of course, for a motor controller, you'd ideally like the input limits to be a float ranging from -1 to +1.
__________________

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.