Go to Post Indianagineers! (n.: In-di-ae-nah-jih-nir: any resident of Gary, Indiana, or it's suburbs, who is trained in the use or design of machines or engines, or in other areas such as electrical or chemical technology) - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 31-12-2004, 11:50
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: A Simple Improvement to Driving

I just went through the thread and spotted a minor error. Sorry to bring it up.

Quote:
Originally Posted by generalbrando
Well if you work through the math, it should be 0 and 256 averaged=128. Then average between that and the originals...64 and 194. Technically 127 is center (right?) so that's a tiny bit off, but the results is a slower spin. I thought there might be a quirk where I would need to handle an exception for such a thing like this, but in testing, I found it works fine all around.
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.
  #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

Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Simple note about life dddriveman Chit-Chat 14 13-05-2004 20:33
Simple things you can do to make your bot/team perform better KenWittlief General Forum 21 01-04-2004 15:11
Simple Autonomous Mode Example deltacoder1020 Programming 5 08-03-2004 20:22
In reference to the driving of Team 25 Goober65 General Forum 24 14-04-2003 23:09
Who's robots are driving already? Anton Abaya General Forum 67 16-02-2002 00:07


All times are GMT -5. The time now is 18:06.

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