View Single Post
  #4   Spotlight this post!  
Unread 05-10-2006, 14:59
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,277
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: need last years programs

Even alot of the logic varies based on robot desigs, some teams did pan and tilt, some teams used gyros to correct, some used encoders. Let us know what you are looking to do and what you habve to work with.

As a note, my code is no commented very well and it calls alot of functions rather than writing the whole autonomous code in the area where ifi says to do it. It would be very difficult for you to read through all of our code and understand it.

If you dont know what I mean about calling functions rather than typing out all the code look at this, it is 237's 2005 autonomous mode, they capped the vision tetra(If I remember correctly)

while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */

/* Make sure compressor is full. */
Check_Compressor();
printf("Cam tilt: %f", cam.tilt_servo);

/* Get vision tetra and cap it. */
if(Have_Tetra_Flag == 0)
{
Get_Vision_Tetra();
}
else if(All_Done == 0)
{
Cap_Tetra();
}
else
Finish_Auto();

Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}

turns out all you have to do to cap in auto is to see if you have a tetra, if you dont go get one and pick it up, pretty simple huh (note sarchasm in reference to simplicity) Any way, back to my point our code wont work for you. Besides it is alot more fun for us to help you with an algorithm than to have you copy ours.

James
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)