Go to Post Okay, Okay, I officially apologize to the the entire country of Canada - Joe Johnson [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 15-01-2002, 23:56
s_alaniz s_alaniz is offline
Registered User
#0057 (Leopards)
 
Join Date: Jun 2001
Location: Houston, Tx
Posts: 73
s_alaniz is an unknown quantity at this point
Listing

Step 1 : Declare the variables in the "Declare Variable" section.

Example:
=============in Declare Variable section=============

PWM1 VAR byte 'define variable for use in Serout command

PWM2 VAR byte 'define variable for use in Serout command





Step 2 : Add the following to the main Program:


=============in MAIN PROGRAM section ================

PWM1 = (((2000 + p1_y - p1_x + 127) Min 2000 Max 2254) - 2000)

PWM2 = (((2000 + p1_y + p1_x - 127) Min 2000 Max 2254) - 2000)




Step 3 : Finally place PWM1 And PWM2 in the Serout command respectively.

Serout USERCPU, OUTBAUD, [255,255, PWM1, relayA, PWM2, relayB, p3_y, p4_y, p1_x, p2_x, p3_x, p4_x, p1_wheel, p2_wheel, p3_wheel, p4_wheel, 127,127,127,127]




Additional Information:

y-axis controls speed
x axis turns
PWM1 - Left Motor
PWM2 - Right Motor
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
question about one joystick drive programing james700 Programming 13 29-01-2003 14:49
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
Does your team use the Default code. Jeff McCune General Forum 2 09-01-2003 14:46
joystick problem archiver 2000 12 23-06-2002 23:08
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


All times are GMT -5. The time now is 00:59.

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