View Single Post
  #15   Spotlight this post!  
Unread 24-06-2002, 02:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
PBASIC TYPO -- patch found here

Posted by Joe Johnson at 03/21/2001 3:52 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: you'll be sorry if you use bevel gears (imho) + free code
Posted by Joe Johnson on 03/21/2001 10:44 AM EST:



I had a typo in my code above -- fixed below.

Joe J.

PWMLeft is left wheel output
(assume fwd robot motion runs motor in reverse)
PWMRight is right wheel output
(assume fwd robot motion runs motor is forward)


BOOST_NUM CON 140
LOG2_BOOST_DEN CON 7
'Effective boost = BOOST_NUM / 2^LOG2_BOOST_DEN

'in the above case boost= 140 / 128 = 1.09

'use whatever means you normally use to generate the

'PWM outputs for the left and right wheels then use the

'following code to modify these values


if PWMLeft > LOG2_BOOST_DEN + $80 MAX $FE
NoBoostLeft:
if PWMRight > $80 then NoBoostRight
PWMRight = $8080 - ($80 - PWMRight * BOOST_NUM >> LOG2_BOOST_DEN) MIN $8000 - $8000
NoBoostRight:

The above code assumes 128 is "off" (128 = $80) for both wheels, this is the standard Victor calibration.

__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.