|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
Re: Strange Auto Problem
We at WATSON are proud to say our Auto mode works now, well at least better then it did when NotQuiteFree, our programmer, posted this. The reason the left side was moving was the pwm neutral count was off by 12 (it didn't stop unless one side was 139 and the other 115.) I am not sure why it was doing that but, the problem was solved and we had a good showing at our Scrimmage today. Thanks to all who helped
Nate Edwards |
|
#3
|
||||
|
||||
|
Re: Strange Auto Problem
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |