Go to Post Students, mentors, schools, corporations, teams, and communities - they are all critical to the success of FIRST. . - dlavery [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
  #6   Spotlight this post!  
Unread 10-12-2006, 08:38
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
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.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 10-12-2006 at 08:41.
 


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
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


All times are GMT -5. The time now is 20:50.

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