View Single Post
  #17   Spotlight this post!  
Unread 01-01-2005, 15:32
generalbrando's Avatar
generalbrando generalbrando is offline
Build, Break, Repeat
AKA: Brandon Mensing
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Nov 2002
Rookie Year: 2001
Location: Boston, MA
Posts: 366
generalbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to behold
Send a message via AIM to generalbrando
Re: A Simple Improvement to Driving

Quote:
Originally Posted by Astronouth7303
I just went through the thread and spotted a minor error. Sorry to bring it up.



Not quite. The maximum you should ever set the PWMs (motors) to is 254. 0 and 254 averaged is 127 (which is center).

Now here's an interesting tidbit: If you were to assign (for testing purposes) 256 to p1_y and 0 to p2_y, and proceeded to try it, the robot would go straight back. Why? Because 256 (Hex 100) is too big for a byte! It wraps to zero! So you end up averaging zero and zero, taking half the difference, etc., etc.
YES! Honestly, as I mentioned, I'm not knowledgable about the programming for the robot (yet). But I could never get an explanation for that odd quirk of 127 being the middle. Thanks and thanks again to everyone for taking a look and giving more advice and input.
__________________
Lead Mentor of Team #246, Boston University Academy and Boston University, Overclocked
www.burobotics.org