Go to Post The problem with anecdotal evidence is that you never seem to get the whole anecdote. - Lea DeFoote [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 13-01-2003, 20:27
JasonWestHigh JasonWestHigh is offline
Registered User
#0648 (Quad CIty Elite)
 
Join Date: Jan 2003
Location: Davenport
Posts: 3
JasonWestHigh is an unknown quantity at this point
programming

how does one go about changing forward to reverse in the edu robot ? Here is the code:

if rc_sw7 = 0 then skipOption7
p1_wheel = (((p1_wheel*154)/254)+100) max 254 'adjust wheel to 154-254
if drive_R < 127 then drive_R_reverse: 'is the right drive forward
drive_R = (drive_R - 127) min 0 'subract 127 to get the forward value
drive_R = (drive_R * p1_wheel)/254 'multiply by the wheel percentage
drive_R = (drive_R + 127) max 254 'add 127 back for proper output
goto drive_R_done: 'exit the drive right section
drive_R_reverse: 'the right drive is reverse
drive_R = (127 - drive_R) min 0 'invert drive-R to get a forward value
drive_R = (drive_R * p1_wheel)/254 'multiply by the wheel percentage
drive_R = (127 - drive_R) min 0 'invert drive_R back to normal
drive_R_done: 'drive_R section complete

if drive_L < 127 then drive_L_reverse: 'is the left drive forward
drive_L = (drive_L - 127) min 0 'subract 127 to get the forward value
drive_L = (drive_L * p1_wheel)/254 'multiply by the wheel percentage
drive_L = (drive_L + 127) max 254 'add 127 back for proper output
goto drive_L_done: 'exit the left right section
drive_L_reverse: 'the left drive is reverse
drive_L = (127 - drive_L) min 0 'invert drive-L to get a forward value
drive_L = (drive_L * p1_wheel)/254 'multiply by the wheel percentage
drive_L = (127 - drive_L) min 0 'invert drive_R back to normal
drive_L_done: 'drive_L section complete
skipOption7:

we changed the less-than signs to greater-than and still nothing happened.
Any ideas?
 


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
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
multi-bank programming problem GregC Programming 3 14-02-2003 16:13
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46
pbasic programming punarhero Programming 4 21-01-2002 23:32


All times are GMT -5. The time now is 13:51.

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