Go to Post anything is possible with dedication. - [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
  #5   Spotlight this post!  
Unread 30-01-2005, 18:49
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,281
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Strange Auto Problem

Ok try this plug the motors into pwms 1 and 2 left into 1 and right into 2.
Add this to define t

static unsigned int t;
then paste this into user routines fast where is says add your autonomous code here,
t++;

if (t < 5)
{
pwm01 = 127;
pwm02 = 127;
pwm03 = 127;
pwm04 = 127;
}

else if (t < 179)
{
pwm01 = 254;
pwm02 = 0;
pwm03 = 254;
pwm04 = 0;
}
else if (t < 353)
{
pwm01 = 0;
pwm02 = 254;
pwm03 = 0;
pwm04 = 254;
}
else
{
pwm01 = 127;
pwm02 = 127;
pwm03 = 127;
pwm04 = 127;
}

then run the bot in autonomous. It should move forward and then backwards, If this works than try using joysticks in ports 1 and 2 to control the two sides of the drive, assign them to PWMs like this,

pwm01 = (p1_y/2)+64;
pwm02 = ((254-p2_y)/2)+64;

port 1 should drive left side and port two should drive the right.

If this all works then there shouldnt be a problem if it doesnt you have a few choices, first choice redownload the default code version 2.4 and try again, Upload your code for some one on here to look at, Your problem could be a misplaced / of a missing value. Or your thid choice double check your wiring and make sure your victors are set up properly.

James
 


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
Programming Problem: Extremely Frustrating chantilly_team Programming 19 12-02-2005 23:00
Physics Problem Venkatesh Math and Science 13 30-11-2004 20:30
Ok one problem cantwell03 Programming 3 13-02-2003 07:28
The problem with scouting... archiver 2001 10 23-06-2002 23:49
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44


All times are GMT -5. The time now is 23:58.

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