Thread: another newbie
View Single Post
  #13   Spotlight this post!  
Unread 05-07-2004, 20:14
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: another newbie

Quote:
Originally Posted by Texan
Code:
// Here you could put in any '#include's which are required for input/output
// You'll have to find a manual to tell you what to do exactly
// Example: #include <example.h>


#define PIR_IS_TRIPPED pir_in == 1 // In place of the pir_in == 1 here, you would put
                                // whatever you need to do to determine if the pir is tripped

int main(int argc, char **argv) // What this is exactly depends somewhat on the compiler
                              // For instance, it might just be int main(void), instead
{
  while(1)
  {
      if(PIR_IS_TRIPPED)
      {
         // Turn on outputs and wait approriate times.
         // I'm not sure how'd you do this using your specific stuff.
      }
  }
  return 1;
}
In the macro, wouldn't you want to use a C style comment? I think it compiles as:
Code:
//...
      if(pir_in == 1 // In place of the pir_in == 1 here, you would put)
//...
Correct me if I'm wrong.