Go to Post ...if two good things are good by themselves let's do them both together to make a better thing. So who's up for an apple pie burrito? - Katy [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 30-01-2008, 20:24
usbcd36's Avatar
usbcd36 usbcd36 is offline
Registered User
AKA: "DOS"
FRC #2399 (The Fighting Unicorns)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Solon, OH
Posts: 151
usbcd36 is a jewel in the roughusbcd36 is a jewel in the roughusbcd36 is a jewel in the rough
Re: 1 Joystick Control

That code assumes that both motors (or sets of motors) move the robot in one direction when they are going forwards. In order to make it work for conventional systems, you need to reverse one of the sides. Simplest way to do that is subtract the value you assign to the PWM outputs from 254:



Code:
  p1_x = 255 - p1_y;

  p1_y = 255 - pwm05;



  pwm13 = pwm14 = 254 - Limit_Mix(2000 + p1_y + p1_x - 127);  // reverse this side

  pwm15 = pwm16 = Limit_Mix(2000 + p1_y - p1_x + 127);
 


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
Joystick control rotated? silliewillie Control System 6 12-02-2005 21:23
We need help with joystick control Team ICE #1611 Control System 4 24-01-2005 15:57
Single joystick control problem Mr. Van Programming 7 23-11-2004 09:10
One Joystick Control KWalsh Programming 4 24-02-2004 17:53
Control System, Joystick mod? Jordan A. Technical Discussion 16 13-02-2002 02:29


All times are GMT -5. The time now is 19:11.

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