Go to Post It shouldn’t be about whether or not you think it’s easy or not, it’s about whether or not you think the effect of the change would be a positive step for our country. - Bill Gold [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 15-02-2007, 21:42
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: need help with our default code

Quote:
Originally Posted by Mark McLeod View Post
To reverse one side do this:
pwm01 = p1_y;
pwm02 = 255-p2_y;

If that reverses the wrong side then do the opposite:
pwm01 = 255-p1_y;
pwm02 = p2_y;
Or you can switch the leads on the speed controller of the motor which is going in reverse direction.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #2   Spotlight this post!  
Unread 15-02-2007, 23:21
coolguybigt's Avatar
coolguybigt coolguybigt is offline
engineer rock (software is fun)
AKA: T
FRC #2043 (Robo Squad)
Team Role: Engineer
 
Join Date: Feb 2007
Rookie Year: 2006
Location: boston
Posts: 24
coolguybigt will become famous soon enoughcoolguybigt will become famous soon enough
Send a message via AIM to coolguybigt Send a message via MSN to coolguybigt
Re: need help with our default code

where do i put those code in my set of code?
  #3   Spotlight this post!  
Unread 15-02-2007, 23:42
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,833
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: need help with our default code

Towards the bottom of what you posted...
Code:
void Default_Routine(void)
{
 
 /*---------- Analog Inputs (Joysticks) to PWM Outputs-----------------------
  *--------------------------------------------------------------------------
  *   This maps the joystick axes to specific PWM outputs.
  */
 
  pwm01 = p1_y;
  pwm02 = 255-p2_y;  
  pwm03 = p3_y;   
  pwm04 = p4_y;   
  pwm05 = p1_x;  
  pwm06 = p2_x;   
  pwm07 = p3_x;   
  pwm08 = p4_x;   
  pwm09 = p1_wheel;
  pwm10 = p2_wheel;   
  pwm11 = p3_wheel;   
  pwm12 = p4_wheel;

Bharat's suggestion is also an easy way to do it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-02-2007 at 11:32. Reason: Left in original pwm02=p2_y
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
Need help with our deadspace. sacr3denigma Programming 2 26-01-2006 18:09
Need help programming our swerve with feedback? activemx Programming 25 13-04-2004 07:29
Need help with my code jaywion Programming 9 20-03-2004 11:32
hey need some help with writing a code please help me here magical hands Programming 9 01-01-2004 21:46
We need help with our website LBK Rules Website Design/Showcase 18 19-01-2003 17:46


All times are GMT -5. The time now is 22:15.

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