Go to Post [how to read the rules] Slowly, carefully, word by word, taking your time as if it was the last corndog of the summer. - Foster [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 10-12-2003, 07:02
AlphaOmega870 AlphaOmega870 is offline
Registered User
AKA: Mike
#0870 (Southold RICE)
Team Role: Programmer
 
Join Date: Oct 2002
Location: Southold, NY
Posts: 18
AlphaOmega870 is an unknown quantity at this point
Send a message via AIM to AlphaOmega870
EDU robot programming

How would I go about changing the default program from single joy stick control to two joy stick control?
  #2   Spotlight this post!  
Unread 10-12-2003, 09:15
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,823
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: EDU robot programming

Quote:
Originally Posted by AlphaOmega870
How would I go about changing the default program from single joy stick control to two joy stick control?
In 1-joystick drive the code mixes the x/y on the one joystick. For 2-joystick drive you just use the y axis on each of 2 joysticks.

Change the following lines in user_routines.c at the top of Default_Routine to get rid of the mixed result and just use the PWM inputs directly.

Original code (get rid of the mixing):
pwm01 = pwm03 = Limit_Mix(2000 + PWM_in1 + PWM_in2 - 127); /* LEFT WHEELS */
pwm02 = pwm04 = Limit_Mix(2000 + PWM_in2 - PWM_in1 + 127); /* RIGHT WHEELS */
pwm01 = pwm03 = 255 - pwm01; /* reverse direction of left side */

New code (just :
pwm01 = pwm03 = 255 - PWM_in2; /* LEFT WHEELS - reverse direction of left side */
pwm02 = pwm04 = PWM_in4; /* RIGHT WHEELS */
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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
How much planning goes into your robot? Jnadke General Forum 41 29-01-2006 21:29
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 19-03-2003 13:30
WASH Palm scouting at the Championship Mike Soukup Scouting 2 19-04-2002 15:14
about how Drive Train push the robot... shouldn't the force accelerate the robot? Ken Leung Technical Discussion 12 26-11-2001 09:39
Robot Programming Game Brandon Martus Chit-Chat 3 10-09-2001 23:37


All times are GMT -5. The time now is 16:18.

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