|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
||||
|
||||
|
Re: Question about programing the bumper sensors
easyC doesn't have a fast loop and a slow loop. Instead you program executes as fast as the processor can run it. Using a button on a interupt probably wouldn't get you anywhere.
When you do this: while(counter<=50) //while the robot is driving backwards { Get_Bumper_Data(Back_Bumper_Port) /*puts the data from the back bumper into a global varaible named Back_Bumper_Data*/ if(Back_Bumper_Data==0) //if back bumper is pressed { break; } The code is probably looping in less then a ms. Things to remeber when you write any code with high accuracy. MPLAB or EasyC Printing to screen kills your loop speed. I don't know the size of rest of your code but as long as you don't have any prints or waits its probably cycling very fast. < 10ms Lasty I think I would use a timer instead of a counter and keep reseting it. We don't give you access to interrupts in easyC V2 for vex because we don't people stalling the microprocessor. Last edited by Kingofl337 : 10-12-2006 at 08:41. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bumper sensors | jbill30 | Programming | 1 | 01-05-2006 18:49 |
| Quick question about sensors..plz help thnx | pheNIX637 | Technical Discussion | 6 | 30-10-2005 02:52 |
| Bumper sensors | jeffmorris | FIRST Tech Challenge | 1 | 02-10-2005 16:20 |
| question on the pressure pad sensors | Simon Strauss | Rules/Strategy | 5 | 08-01-2005 23:42 |
| question about one joystick drive programing | james700 | Programming | 13 | 29-01-2003 14:49 |