Go to Post Do what you want. Deal with the results. - Andy Baker [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #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?
  #2   Spotlight this post!  
Unread 13-01-2003, 20:54
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
I think you're looking at the wrong chunk of code. This section (Option7) deals with the steering sensitivity. Option 6 is the one which deals with reversing the driving direction. To enable it, put a jumper on sw6.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
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
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 00:33.

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