Go to Post Pit Tools Distraction=bad - Lil' Lavery [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-11-2009, 21:06
Monty Python Monty Python is offline
Registered User
no team
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Philadelphia
Posts: 83
Monty Python has a spectacular aura aboutMonty Python has a spectacular aura aboutMonty Python has a spectacular aura about
Re: [FTC]: Autonomous Code Ender

You can set a while loop as less than one of the timer's in robotc. You'll have to check the help files for the exact syntax as I don't remember it offhand, but if I remember correctly, I think it looks something like...

while(T1<20000)
{
//put code here
}

I think that T1 is a millisecond timer, but just search the help files in RobotC for timer and you should be good to go.

Oh and you probably want to set T1 equal to 0 at the beginning of autonomous, but I'm not 100% sure (again, the help file should tell you everything you need to know).
Reply With Quote
  #2   Spotlight this post!  
Unread 01-12-2009, 15:41
clwilligham clwilligham is offline
Registered User
FTC #2845 (Team Duct Tape)
Team Role: Programmer
 
Join Date: Nov 2009
Rookie Year: 2006
Location: Florida
Posts: 4
clwilligham is an unknown quantity at this point
Re: [FTC]: Autonomous Code Ender

you can do that if you make sure you clear the timer first, or if you want to have it go through a loop a specific number of times you can use a for loop

for(int i=0; i < 10; i++)
{
//code here
}

if you want to use timers, i'm pretty sure the syntax is timer[T1] to read or write the timer.
to reset a timer you would just to timer[T1] = 0;
Reply With Quote
  #3   Spotlight this post!  
Unread 01-12-2009, 20:29
rzoeller rzoeller is offline
MN GOFIRST Recruitment Officer
AKA: Ryan Zoeller
FRC #2169 (RI3D 'Snow Problem; KING TeC)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2007
Location: Savage, MN
Posts: 111
rzoeller is a jewel in the roughrzoeller is a jewel in the roughrzoeller is a jewel in the rough
Re: [FTC]: Autonomous Code Ender

Thank you both for the help
Reply With Quote
Reply


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
[FTC]: 3033 Autonomous! Mushrooshi FIRST Tech Challenge 6 21-04-2009 22:19
[FTC]: 121 Autonomous gregsanCHEVY121 FIRST Tech Challenge 20 10-04-2009 23:10
[FTC]: Autonomous saaby FIRST Tech Challenge 8 19-02-2009 12:45
Video: FTC 3 Cloverfield Autonomous Synergy1848 Robot Showcase 0 26-02-2008 14:34
Autonomous code PBoss Programming 7 14-01-2003 15:29


All times are GMT -5. The time now is 12:56.

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