|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Autonomous problem
I have written this for atonomous code but the the robot does not stop when the counter reaches 2000. Anyone know why?
/* Add your own autonomous code here. */ switch (Step) { case 1: { stop = 2000; crawl = (stop - 200); slow = (stop - 100); Left_Count = Get_Left_Encoder_Count(); Right_Count = Get_Right_Encoder_Count(); if (Left_Count < slow) pwm03 = 220; if (Left_Count > slow && Left_Count < crawl) pwm03 =200; if (Left_Count > crawl && Left_Count < stop) pwm03 =150; if (Left_Count >= stop) pwm03 =127; printf("Left Counter %ld\r", Left_Count); if (Right_Count < slow) pwm04 =220; if (Right_Count > slow && Right_Count < crawl) pwm04 =200; if (Left_Count > crawl && Right_Count < stop) pwm04 =150; if (Right_Count >= stop) pwm04 =127; printf("Right Counter %ld\r", Right_Count); |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Autonomous Problem... | JoeFryman | Programming | 2 | 19-02-2005 14:56 |
| Future of Autonomous Mode | FadyS. | Programming | 41 | 24-05-2004 19:45 |
| problem with autonomous that has stumped all programmers so far | bd02 | Programming | 32 | 10-03-2004 22:22 |
| autonomous mode problem on field | Chris_C | Programming | 17 | 26-03-2003 19:11 |
| The problem with scouting... | archiver | 2001 | 10 | 23-06-2002 23:49 |