View Single Post
  #2   Spotlight this post!  
Unread 15-01-2006, 20:36
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Need a little help with how to break out of the box

Quote:
Originally Posted by amateurrobotguy
I want to do some automation. I put Automation(); in the user routines fast.c under the 'insert auto in here'. Does this need to be Automation(void);?

I put Automation(); in the userroutines.h. Does this need to be automation(void);?

What would be an example of why the void is used? I know it is something like if the function returns output but do I need to expressly say this function has run?

I put my my automation function in user_routines.c defining it as void automation(void) {

Please tell me if all that I said is o.k.

Now how do I make it so that I can put Automation in its own .c file? Will it need its own .h? Do I have to define the .c file in ht userroutines.h? How will it know to use automation.h? to get to automation.c? to get to automation().

Now, how do I test this auto code without being in a match? Do I just move the call to automation from urf.c to ur.c?
I think you need to learn a bit more about C and C function prototyping. A good link repository is on the AVRFreaks Forum.

You could just move the functions from user_routines_fast.c to user_routines.c, or you can create an autonomous jumper. I forget specifically what pins you need to jump on the OI, but a quick search should bring it up.
__________________
http://www.mikesorrenti.com/