Go to Post People can talk a big game, but unless they start working on what they talk about, nothing will get done. - Lisa Perez [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2005, 17:40
gemccnp gemccnp is offline
Registered User
no team
 
Join Date: Jan 2005
Location: Montana
Posts: 10
gemccnp is an unknown quantity at this point
Question Any Examples Of Ready To Go Autonymous Code Out There ?

Hi everyone, hope your projects are going well.

I keep hitting a wall when trying to recompile with autonymous code.

I am not a great programmer but am giving it a try for the team's sake.

I tried to edit the user_routines_fast.c file per the instructions and add some code just to start with a test run. I used the autonymous notes doc by chuck.

When I choose the make function, I get errors on line 130. Even if I just try to put simple code in there for some routine, it gets errors.

I am just trying to get the robot to do something simple but have movement during the 15 seconds.

Does anyone have an example of working code out there?

Thanks for any help.....
  #2   Spotlight this post!  
Unread 20-02-2005, 18:14
jimfortytwo jimfortytwo is offline
Registered User
AKA: Jim Paulos
#0418 (Purple Haze)
Team Role: Student
 
Join Date: Feb 2003
Rookie Year: 2002
Location: austin
Posts: 65
jimfortytwo is just really nicejimfortytwo is just really nicejimfortytwo is just really nicejimfortytwo is just really nicejimfortytwo is just really nice
Send a message via ICQ to jimfortytwo Send a message via AIM to jimfortytwo Send a message via Yahoo to jimfortytwo
Re: Any Examples Of Ready To Go Autonymous Code Out There ?

How simple is simple?
How about driving forwards for about 5 seconds, and then stopping?
There are good threads on using arrays to do multiple-step routines, using a "timer" like this. Consider this a specific answer to a vague question.

//add this to the top of the user_routines_fast.c file
int timer =0;


/*this is the section of User_Autonomous_Code() in user_routines_fast.c
that you want to edit*/
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! */

/*****************/ //here is the change
if(timer < 190)
pwm01 = pwm02 = pwm03 = pwm04 = 255;
else
pwm01 = pwm02 = pwm03 = pwm04 = 127;
timer++;
/******************/


Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}
}
  #3   Spotlight this post!  
Unread 20-02-2005, 19:24
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Any Examples Of Ready To Go Autonymous Code Out There ?

Telling us that there is an error on line 130 without showing us the code on and around that line or even the message itself makes it very difficult to spot syntax errors...
__________________
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!
Closed Thread


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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
Sourceforge for Code Repository and other stuff SilverStar Programming 9 15-01-2005 21:16
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Custom Dashboard code for LabVIEW ready for download. archiver 2001 3 24-06-2002 00:49


All times are GMT -5. The time now is 19:15.

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