Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   One Joystick Code (http://www.chiefdelphi.com/forums/showthread.php?t=1829)

fs_2002 15-01-2002 23:21

One Joystick Code
 
Some how i've lost my way-

I at one time found and printed a program which was the default code which was modified to use only 1 joystick. I can't find it anymore, and i can't access innovationfirst.com because it crashes my computer everytime. If anyone can help, i would greatly appriciate it.
~bobb
Team 804

Jay Lundy 15-01-2002 23:53

Here's a direct link to the pdf:

http://www.innovationfirst.com/FIRST...ickControl.pdf

s_alaniz 15-01-2002 23:56

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

fs_2002 16-01-2002 00:47

Thx guys- i appriciate it, and so does my team
~bobb
Team 804


All times are GMT -5. The time now is 09:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi