View Single Post
  #4   Spotlight this post!  
Unread 18-02-2006, 07:17
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Pot Printf Variable

Quote:
Originally Posted by Idaman323
would that work, and would the top part go into adc.h or adc.c?
You should place the sensor declaration whereever you are going to be using it. If it needs to be in multiple places, put an extern declaration in a header file which you then include in the extra files. IE:

externDeclartion.h (or whatever you want to call it)
Code:
extern unsigned int sensor1;
someFile.c
Code:
#include "externDeclaration.h"
...
--EDIT--
And yeah, you have the idea.
__________________