Go to Post BTW - using any Lavery clue to figure anything out could be equally impossible. - Raul [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 21-04-2009, 12:32
dooey100 dooey100 is offline
Registered User
FTC #3037
 
Join Date: Feb 2009
Location: Fernie
Posts: 47
dooey100 is on a distinguished road
Thumbs up [FTC]: Post your code!

Post your code so that others may learn from you and you may learn from others!


Here is our code, its not exactly the most readable, we made a lot of changes during our competition and I didn't do any comments for that code, and I'm not exactly good about my commenting in the first place, bet here ya go. Alot of the stuff is very poorly written, from when I was first learning RobotC, so we aren't as bad at coding as you might think from some of this.

What each function does:

MotorDeadZone: Limits our joystick values to be within +/- 100 and sets it to zero if it is close to zero (this accounts for the joysticks not always returning to zero)

Drive: sets the drive motor speed and turns our servo powered castors to the proper position for the setting (we used the d-pad for driving)

Arm: pretty self explanatory

Flippers: our flippers were NXT powered, and used to quickly knock out opponents puck racks. Uses a button to set a position for the flipper (either up or down) the function is intentionally written so there are no loops, so you can drive regardless of the position

LiftBucketToVerticle, LiftBucketToVerticleSlow, BackwardsGoal, BucketToGround, CollectPucksLeft, ColelctPucksRight, and CollectPucksBack are all button activated subroutines to automate difficult and/or common tasks.

DriveToTapePlusEncoder: this function was originally supposed to drive until it hits the tape then keep going for an encoder distance, but we switched to a time instead.
Attached Files
File Type: c TELEOP.c (10.8 KB, 52 views)
File Type: c LEFT_AUTO.c (10.5 KB, 40 views)
File Type: c RIGHT_AUTO.c (10.5 KB, 41 views)
Reply With Quote
 


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]: FTC 2008-2009 Championship - your thoughts Abra Cadabra IV FIRST Tech Challenge 7 21-04-2009 00:02
[FTC]: NXT Display Code gdo FIRST Tech Challenge 6 05-02-2009 10:16
[FTC]: Your in Atlanta...now what? gdo FIRST Tech Challenge 0 10-04-2008 21:49
[FTC]: FTC]: FTC Champ Tournament - Ontario (Scoring Breakdown) Mr. Lim FIRST Tech Challenge 2 03-03-2008 11:54
Post Your Team Number If your Going to Hartford Competition. DanTheRobotMan Scouting 2 13-01-2006 08:44


All times are GMT -5. The time now is 18:38.

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